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 savegame was created with are saved in a seperate moduledata file in the saved game zip.
Since:
3.1.0
Author:
Brent Easton
  • Field Details

  • Constructor Details

    • SaveMetaData

      public SaveMetaData()
    • SaveMetaData

      public SaveMetaData​(ZipFile zip)
  • Method Details

    • getModuleName

      public String getModuleName()
    • getModuleVersion

      public String getModuleVersion()
    • getModuleData

      public ModuleMetaData getModuleData()
    • getZipEntryName

      public String getZipEntryName()
      Description copied from class: AbstractMetaData
      Return the Entry name for the metatdata file
      Specified by:
      getZipEntryName in class AbstractMetaData
      Returns:
      Zip Entry name
    • getMetaDataVersion

      public String getMetaDataVersion()
      Description copied from class: AbstractMetaData
      Return the version of the metadata structure
      Specified by:
      getMetaDataVersion in class AbstractMetaData
      Returns:
      version
    • save

      public void save​(FileArchive archive) throws IOException
      Write Save Game metadata to the specified Archive
      Overrides:
      save in class AbstractMetaData
      Parameters:
      archive - Save game Archive
      Throws:
      IOException - If anything goes wrong
    • addElements

      protected void addElements​(Document doc, Element root)
      Add Elements specific to SaveMetaData
      Specified by:
      addElements in class AbstractMetaData
      Parameters:
      doc - Document
      root - Root element
    • read

      public void read​(ZipFile zip)
      Read and validate a Saved Game/Log file. Check that it has a Zip Entry named savedgame. If it has a metadata file, read and parse it. Closes the ZipFile
      Parameters:
      zip - Saved Game File