Class AbstractMetaData
java.lang.Object
VASSAL.build.module.metadata.AbstractMetaData
- Direct Known Subclasses:
ExtensionMetaData
,ImportMetaData
,ModuleMetaData
,SaveMetaData
Base class representing the metadata for a Saved Game, Module or Extension.
- Since:
- 3.1.0
- Author:
- Brent Easton
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected VASSAL.build.module.metadata.AbstractMetaData.Attribute
protected static final String
protected String
protected static final String
protected String
protected static final String
protected static final String
protected static final String
protected String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final XMLReader
This is the shared parser for all subclasses of AbstractMetaData.protected static final String
protected static final String
protected static final String
protected static final String
protected String
protected String
protected static final String
protected static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
addElements
(Document doc, Element root) Add elements specific to a MetaData subclassvoid
copyModuleMetadata
(ArchiveWriter archive) Copy the Module metadata from the current module into the specified archive.void
copyModuleMetadata
(FileArchive archive) void
abstract String
Return the version of the metadata structureabstract String
Return the Entry name for the metadata filestatic boolean
isPreBug11929
(String version) protected void
save
(OutputStream out) void
save
(ArchiveWriter archive) Write common metadata to the specified Archive.void
save
(FileArchive archive) void
void
setDescription
(String desc) void
setDescription
(VASSAL.build.module.metadata.AbstractMetaData.Attribute desc) void
void
void
setLastSaved
(String lastSaved) void
void
setVersion
(String s)
-
Field Details
-
TRUE
- See Also:
-
FALSE
- See Also:
-
NAME_ATTR
- See Also:
-
VERSION_ATTR
- See Also:
-
VASSAL_VERSION_ATTR
- See Also:
-
DESCRIPTION_ATTR
- See Also:
-
EXTENSION_ATTR
- See Also:
-
MODULE_NAME_ATTR
- See Also:
-
MODULE_VERSION_ATTR
- See Also:
-
LANG_ATTR
- See Also:
-
ROOT_ELEMENT
- See Also:
-
VERSION_ELEMENT
- See Also:
-
EXTRA1_ELEMENT
- See Also:
-
EXTRA2_ELEMENT
- See Also:
-
VASSAL_VERSION_ELEMENT
- See Also:
-
MODULE_NAME_ELEMENT
- See Also:
-
MODULE_VERSION_ELEMENT
- See Also:
-
DESCRIPTION_ELEMENT
- See Also:
-
NAME_ELEMENT
- See Also:
-
DATE_SAVED_ELEMENT
- See Also:
-
CHECKSUM_ELEMENT
- See Also:
-
BUILDFILE_MODULE_ELEMENT1
- See Also:
-
BUILDFILE_MODULE_ELEMENT2
- See Also:
-
BUILDFILE_EXTENSION_ELEMENT
- See Also:
-
BUG_11929_VASSAL_FIX_VERSION
- See Also:
-
version
-
vassalVersion
-
descriptionAttr
protected VASSAL.build.module.metadata.AbstractMetaData.Attribute descriptionAttr -
lastSaved
-
extra1
-
extra2
-
parser
This is the shared parser for all subclasses of AbstractMetaData. We use a shared parser. All uses of this parser must be wrapped in a block synchronized on the parser itself.
-
-
Constructor Details
-
AbstractMetaData
public AbstractMetaData()
-
-
Method Details
-
isPreBug11929
-
getVersion
-
setVersion
-
getExtra1
-
setExtra1
-
getExtra2
-
setExtra2
-
getVassalVersion
-
setVassalVersion
-
setDescription
public void setDescription(VASSAL.build.module.metadata.AbstractMetaData.Attribute desc) -
setDescription
-
getDescription
-
getLocalizedDescription
-
getLastSaved
-
setLastSaved
-
formatLastSaved
-
save
- Throws:
IOException
-
save
- Throws:
IOException
-
save
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
- Throws:
IOException
-
copyModuleMetadata
Copy the Module metadata from the current module into the specified archive.- Parameters:
archive
- Archive to copy into- Throws:
IOException
- exception
-
copyModuleMetadata
- Throws:
IOException
-
copyModuleMetadata
- Throws:
IOException
-
getZipEntryName
Return the Entry name for the metadata file- Returns:
- Zip Entry name
-
getMetaDataVersion
Return the version of the metadata structure- Returns:
- version
-
addElements
-