Package VASSAL.build.module.metadata
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
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected VASSAL.build.module.metadata.AbstractMetaData.Attributeprotected static final Stringprotected Stringprotected static final Stringprotected Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final XMLReaderThis is the shared parser for all subclasses of AbstractMetaData.protected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected Stringprotected Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddElements(Document doc, Element root) Add elements specific to a MetaData subclassvoidcopyModuleMetadata(ArchiveWriter archive) Copy the Module metadata from the current module into the specified archive.voidcopyModuleMetadata(FileArchive archive) voidabstract StringReturn the version of the metadata structureabstract StringReturn the Entry name for the metadata filestatic booleanisPreBug11929(String version) protected voidsave(OutputStream out) voidsave(ArchiveWriter archive) Write common metadata to the specified Archive.voidsave(FileArchive archive) voidvoidsetDescription(String desc) voidsetDescription(VASSAL.build.module.metadata.AbstractMetaData.Attribute desc) voidvoidvoidsetLastSaved(String lastSaved) voidvoidsetVersion(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
-