Class AbstractMetaData

java.lang.Object
VASSAL.build.module.metadata.AbstractMetaData
Direct Known Subclasses:
ExtensionMetaData, ImportMetaData, ModuleMetaData, SaveMetaData

public abstract class AbstractMetaData extends Object
Base class representing the metadata for a Saved Game, Module or Extension.
Since:
3.1.0
Author:
Brent Easton
  • Field Details

  • Constructor Details

    • AbstractMetaData

      public AbstractMetaData()
  • Method Details

    • isPreBug11929

      public static boolean isPreBug11929(String version)
    • getVersion

      public String getVersion()
    • setVersion

      public void setVersion(String s)
    • getExtra1

      public String getExtra1()
    • setExtra1

      public void setExtra1(String s)
    • getExtra2

      public String getExtra2()
    • setExtra2

      public void setExtra2(String s)
    • getVassalVersion

      public String getVassalVersion()
    • setVassalVersion

      public void setVassalVersion(String s)
    • setDescription

      public void setDescription(VASSAL.build.module.metadata.AbstractMetaData.Attribute desc)
    • setDescription

      public void setDescription(String desc)
    • getDescription

      public String getDescription()
    • getLocalizedDescription

      public String getLocalizedDescription()
    • getLastSaved

      public String getLastSaved()
    • setLastSaved

      public void setLastSaved(String lastSaved)
    • formatLastSaved

      public String formatLastSaved()
    • save

      public void save(FileArchive archive) throws IOException
      Throws:
      IOException
    • save

      protected void save(OutputStream out) throws IOException
      Throws:
      IOException
    • save

      public void save(ArchiveWriter archive) throws IOException
      Write common metadata to the specified Archive. Call addElements to add elements specific to particular concrete subclasses.
      Parameters:
      archive - Extension Archive
      Throws:
      IOException - If anything goes wrong
    • save

      public void save(ZipWriter zw) throws IOException
      Throws:
      IOException
    • copyModuleMetadata

      public void copyModuleMetadata(ArchiveWriter archive) throws IOException
      Copy the Module metadata from the current module into the specified archive.
      Parameters:
      archive - Archive to copy into
      Throws:
      IOException - exception
    • copyModuleMetadata

      public void copyModuleMetadata(FileArchive archive) throws IOException
      Throws:
      IOException
    • copyModuleMetadata

      public void copyModuleMetadata(ZipWriter zw) throws IOException
      Throws:
      IOException
    • getZipEntryName

      public abstract String getZipEntryName()
      Return the Entry name for the metadata file
      Returns:
      Zip Entry name
    • getMetaDataVersion

      public abstract String getMetaDataVersion()
      Return the version of the metadata structure
      Returns:
      version
    • addElements

      protected abstract void addElements(Document doc, Element root)
      Add elements specific to a MetaData subclass
      Parameters:
      doc - Document
      root - Root element