Class ModuleMetaData

java.lang.Object
VASSAL.build.module.metadata.AbstractMetaData
VASSAL.build.module.metadata.ModuleMetaData

public class ModuleMetaData extends AbstractMetaData
Class representing the metadata for a Module or an Extension. Modules and extensions can't be differentiated until either the metadata or the buildfile is parsed, so they share the same metadata structure.
Since:
3.1.0
Author:
Brent Easton
  • Field Details

  • Constructor Details

    • ModuleMetaData

      public ModuleMetaData(ZipFile zip)
    • ModuleMetaData

      public ModuleMetaData(GameModule module)
    • ModuleMetaData

      public ModuleMetaData(String name, String version)
  • Method Details

    • getName

      public String getName()
    • getLocalizedName

      public String getLocalizedName()
    • getZipEntryName

      public String getZipEntryName()
      Description copied from class: AbstractMetaData
      Return the Entry name for the metadata 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
    • addElements

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

      public void read(ZipFile zip)
      Read and validate a Module file. - Check it has a Zip Entry named buildfile - If it has a metadata file, read and parse it. Closes the ZipFile.
      Parameters:
      zip - Module File