Class ExtensionMetaData
java.lang.Object
VASSAL.build.module.metadata.AbstractMetaData
VASSAL.build.module.metadata.ExtensionMetaData
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected ModuleMetaData
protected boolean
protected static final String
protected static final String
static final String
Fields inherited from class VASSAL.build.module.metadata.AbstractMetaData
BUG_11929_VASSAL_FIX_VERSION, BUILDFILE_EXTENSION_ELEMENT, BUILDFILE_MODULE_ELEMENT1, BUILDFILE_MODULE_ELEMENT2, CHECKSUM_ELEMENT, DATE_SAVED_ELEMENT, DESCRIPTION_ATTR, DESCRIPTION_ELEMENT, descriptionAttr, EXTENSION_ATTR, extra1, EXTRA1_ELEMENT, extra2, EXTRA2_ELEMENT, 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
ConstructorDescriptionExtensionMetaData
(ZipFile zip) Read Extension metadata from specified zip archiveBuild an ExtensionMetaData for the given extension -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addElements
(Document doc, Element root) Add elements specific to an ExtensionMetaDataReturn the version of the metadata structureReturn the Entry name for the metadata filevoid
Read and validate an Extension filevoid
save
(ArchiveWriter archive) Write Extension metadata to the specified Archivevoid
Methods inherited from class VASSAL.build.module.metadata.AbstractMetaData
copyModuleMetadata, copyModuleMetadata, copyModuleMetadata, formatLastSaved, getDescription, getExtra1, getExtra2, getLastSaved, getLocalizedDescription, getVassalVersion, getVersion, isPreBug11929, save, save, setDescription, setDescription, setExtra1, setExtra2, setLastSaved, setVassalVersion, setVersion
-
Field Details
-
ZIP_ENTRY_NAME
- See Also:
-
DATA_VERSION
- See Also:
-
UNIVERSAL_ELEMENT
- See Also:
-
UNIVERSAL_ATTR
- See Also:
-
moduleData
-
universal
protected boolean universal
-
-
Constructor Details
-
ExtensionMetaData
Build an ExtensionMetaData for the given extension- Parameters:
ext
- Extension
-
ExtensionMetaData
Read Extension metadata from specified zip archive- Parameters:
zip
- the archive
-
-
Method Details
-
getModuleName
-
getModuleVersion
-
getZipEntryName
Description copied from class:AbstractMetaData
Return the Entry name for the metadata file- Specified by:
getZipEntryName
in classAbstractMetaData
- Returns:
- Zip Entry name
-
getMetaDataVersion
Description copied from class:AbstractMetaData
Return the version of the metadata structure- Specified by:
getMetaDataVersion
in classAbstractMetaData
- Returns:
- version
-
save
Write Extension metadata to the specified Archive- Overrides:
save
in classAbstractMetaData
- Parameters:
archive
- Save game Archive- Throws:
IOException
- If anything goes wrong
-
save
- Overrides:
save
in classAbstractMetaData
- Throws:
IOException
-
addElements
Add elements specific to an ExtensionMetaData- Specified by:
addElements
in classAbstractMetaData
- Parameters:
doc
- Documentroot
- Root element
-
read
Read and validate an Extension file. - Check it has a Zip Entry named buildfile - If it has a metadata file, read and parse it. Closes the Zip file.- Parameters:
zip
- Module File
-