Package VASSAL.build.module.metadata
Class SaveMetaData
java.lang.Object
VASSAL.build.module.metadata.AbstractMetaData
VASSAL.build.module.metadata.SaveMetaData
public class SaveMetaData extends AbstractMetaData
Class representing the metadata for a Save Game/Log File. Details
about the module this saved game was created with are saved in a
separate module data file in the saved game zip.
- Since:
- 3.1.0
- Author:
- Brent Easton
-
Field Summary
Fields Modifier and Type Field Description static StringDATA_VERSIONprotected ModuleMetaDatamoduleDatastatic StringPROMPT_LOG_COMMENTstatic StringZIP_ENTRY_NAMEFields inherited from class VASSAL.build.module.metadata.AbstractMetaData
BUILDFILE_EXTENSION_ELEMENT, BUILDFILE_MODULE_ELEMENT1, BUILDFILE_MODULE_ELEMENT2, DATE_SAVED_ELEMENT, DESCRIPTION_ATTR, DESCRIPTION_ELEMENT, descriptionAttr, EXTENSION_ATTR, FALSE, LANG_ATTR, lastSaved, MODULE_NAME_ATTR, MODULE_NAME_ELEMENT, MODULE_VERSION_ATTR, MODULE_VERSION_ELEMENT, NAME_ATTR, NAME_ELEMENT, parser, ROOT_ELEMENT, TRUE, VASSAL_VERSION_ATTR, VASSAL_VERSION_ELEMENT, vassalVersion, version, VERSION_ATTR, VERSION_ELEMENT -
Constructor Summary
Constructors Constructor Description SaveMetaData()SaveMetaData(ZipFile zip) -
Method Summary
Modifier and Type Method Description protected voidaddElements(Document doc, Element root)Add Elements specific to SaveMetaDataStringgetMetaDataVersion()Return the version of the metadata structureModuleMetaDatagetModuleData()StringgetModuleName()StringgetModuleVersion()StringgetZipEntryName()Return the Entry name for the metadata filevoidread(ZipFile zip)Read and validate a Saved Game/Log file.voidsave(FileArchive archive)Write Save Game metadata to the specified Archivevoidsave(ZipWriter zw)Methods inherited from class VASSAL.build.module.metadata.AbstractMetaData
copyModuleMetadata, copyModuleMetadata, copyModuleMetadata, formatLastSaved, getDescription, getLastSaved, getLocalizedDescription, getVassalVersion, getVersion, save, save, setDescription, setDescription, setLastSaved, setVassalVersion, setVersion
-
Field Details
-
ZIP_ENTRY_NAME
- See Also:
- Constant Field Values
-
DATA_VERSION
- See Also:
- Constant Field Values
-
PROMPT_LOG_COMMENT
- See Also:
- Constant Field Values
-
moduleData
-
-
Constructor Details
-
SaveMetaData
public SaveMetaData() -
SaveMetaData
-
-
Method Details
-
getModuleName
-
getModuleVersion
-
getModuleData
-
getZipEntryName
Description copied from class:AbstractMetaDataReturn the Entry name for the metadata file- Specified by:
getZipEntryNamein classAbstractMetaData- Returns:
- Zip Entry name
-
getMetaDataVersion
Description copied from class:AbstractMetaDataReturn the version of the metadata structure- Specified by:
getMetaDataVersionin classAbstractMetaData- Returns:
- version
-
save
Write Save Game metadata to the specified Archive- Overrides:
savein classAbstractMetaData- Parameters:
archive- Save game Archive- Throws:
IOException- If anything goes wrong
-
save
- Overrides:
savein classAbstractMetaData- Throws:
IOException
-
addElements
Add Elements specific to SaveMetaData- Specified by:
addElementsin classAbstractMetaData- Parameters:
doc- Documentroot- Root element
-
read
Read and validate a Saved Game/Log file. Check that it has a Zip Entry named saved game. If it has a metadata file, read and parse it. Closes theZipFile- Parameters:
zip- Saved Game File
-