Package VASSAL.build.module.metadata
Class ExtensionMetaData
java.lang.Object
VASSAL.build.module.metadata.AbstractMetaData
VASSAL.build.module.metadata.ExtensionMetaData
public class ExtensionMetaData extends AbstractMetaData
-
Field Summary
Fields Modifier and Type Field Description static StringDATA_VERSIONprotected ModuleMetaDatamoduleDataprotected booleanuniversalprotected static StringUNIVERSAL_ATTRprotected static StringUNIVERSAL_ELEMENTstatic 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, 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 ExtensionMetaData(ZipFile zip)Read Extension metadata from specified zip archiveExtensionMetaData(ModuleExtension ext)Build an ExtensionMetaData for the given extension -
Method Summary
Modifier and Type Method Description protected voidaddElements(Document doc, Element root)Add elements specific to an ExtensionMetaDataStringgetMetaDataVersion()Return the version of the metadata structureStringgetModuleName()StringgetModuleVersion()StringgetZipEntryName()Return the Entry name for the metatdata filevoidread(ZipFile zip)Read and validate an Extension file.voidsave(ArchiveWriter archive)Write Extension metadata to the specified ArchiveMethods inherited from class VASSAL.build.module.metadata.AbstractMetaData
copyModuleMetadata, copyModuleMetadata, getDescription, getLocalizedDescription, getVassalVersion, getVersion, save, save, setDescription, setDescription, setVassalVersion, setVersion
-
Field Details
-
ZIP_ENTRY_NAME
- See Also:
- Constant Field Values
-
DATA_VERSION
- See Also:
- Constant Field Values
-
UNIVERSAL_ELEMENT
- See Also:
- Constant Field Values
-
UNIVERSAL_ATTR
- See Also:
- Constant Field Values
-
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:AbstractMetaDataReturn the Entry name for the metatdata 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 Extension metadata to the specified Archive- Overrides:
savein classAbstractMetaData- Parameters:
archive- Save game Archive- Throws:
IOException- If anything goes wrong
-
addElements
Add elements specific to an ExtensionMetaData- Specified by:
addElementsin 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
-