Package VASSAL.build.module.metadata
Class ModuleMetaData
java.lang.Object
VASSAL.build.module.metadata.AbstractMetaData
VASSAL.build.module.metadata.ModuleMetaData
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 Summary
Modifier and TypeFieldDescriptionstatic String
protected VASSAL.build.module.metadata.AbstractMetaData.Attribute
static String
Fields 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, 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
ConstructorDescriptionModuleMetaData(String name, String version)
ModuleMetaData(ZipFile zip)
ModuleMetaData(GameModule module)
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addElements(Document doc, Element root)
Add elements specific to a ModuleMetaDataReturn the version of the metadata structuregetName()
Return the Entry name for the metadata filevoid
Read and validate a Module file.Methods inherited from class VASSAL.build.module.metadata.AbstractMetaData
copyModuleMetadata, copyModuleMetadata, copyModuleMetadata, formatLastSaved, getDescription, getLastSaved, getLocalizedDescription, getVassalVersion, getVersion, save, save, save, save, setDescription, setDescription, setLastSaved, setVassalVersion, setVersion
-
Field Details
-
ZIP_ENTRY_NAME
- See Also:
- Constant Field Values
-
DATA_VERSION
- See Also:
- Constant Field Values
-
nameAttr
protected VASSAL.build.module.metadata.AbstractMetaData.Attribute nameAttr
-
-
Constructor Details
-
ModuleMetaData
-
ModuleMetaData
-
ModuleMetaData
-
-
Method Details
-
getName
-
getLocalizedName
-
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
-
addElements
Add elements specific to a ModuleMetaData- Specified by:
addElements
in classAbstractMetaData
- Parameters:
doc
- Documentroot
- Root element
-
read
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 theZipFile
.- Parameters:
zip
- Module File
-