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
Modifier and TypeFieldDescriptionprotected static String
protected static String
protected static String
protected static String
protected static String
protected static String
protected VASSAL.build.module.metadata.AbstractMetaData.Attribute
protected static String
protected static String
protected static String
protected String
protected static String
protected static String
protected static String
protected static String
protected static String
protected static String
protected static XMLReader
This is the shared parser for all subclasses of AbstractMetaData.protected static String
protected static String
protected static String
protected static String
protected String
protected String
protected static String
protected static 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 fileprotected 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
setLastSaved(String lastSaved)
void
void
setVersion(String s)
-
Field Details
-
TRUE
- See Also:
- Constant Field Values
-
FALSE
- See Also:
- Constant Field Values
-
NAME_ATTR
- See Also:
- Constant Field Values
-
VERSION_ATTR
- See Also:
- Constant Field Values
-
VASSAL_VERSION_ATTR
- See Also:
- Constant Field Values
-
DESCRIPTION_ATTR
- See Also:
- Constant Field Values
-
EXTENSION_ATTR
- See Also:
- Constant Field Values
-
MODULE_NAME_ATTR
- See Also:
- Constant Field Values
-
MODULE_VERSION_ATTR
- See Also:
- Constant Field Values
-
LANG_ATTR
- See Also:
- Constant Field Values
-
ROOT_ELEMENT
- See Also:
- Constant Field Values
-
VERSION_ELEMENT
- See Also:
- Constant Field Values
-
VASSAL_VERSION_ELEMENT
- See Also:
- Constant Field Values
-
MODULE_NAME_ELEMENT
- See Also:
- Constant Field Values
-
MODULE_VERSION_ELEMENT
- See Also:
- Constant Field Values
-
DESCRIPTION_ELEMENT
- See Also:
- Constant Field Values
-
NAME_ELEMENT
- See Also:
- Constant Field Values
-
DATE_SAVED_ELEMENT
- See Also:
- Constant Field Values
-
BUILDFILE_MODULE_ELEMENT1
- See Also:
- Constant Field Values
-
BUILDFILE_MODULE_ELEMENT2
- See Also:
- Constant Field Values
-
BUILDFILE_EXTENSION_ELEMENT
- See Also:
- Constant Field Values
-
version
-
vassalVersion
-
descriptionAttr
protected VASSAL.build.module.metadata.AbstractMetaData.Attribute descriptionAttr -
lastSaved
-
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
-
getVersion
-
setVersion
-
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
Add elements specific to a MetaData subclass- Parameters:
doc
- Documentroot
- Root element
-