public class PreviewPersistenceProvider extends Object implements WorkspaceXMLPersistenceProvider
| Constructor and Description |
|---|
PreviewPersistenceProvider() |
| Modifier and Type | Method and Description |
|---|---|
String |
getIdentifier()
Unique identifier for your
WorkspacePersistenceProvider. |
void |
readXML(XMLStreamReader reader,
Workspace workspace)
This is automatically called when a start element with the tag name
provided in your
getIdentifier method. |
void |
writeXML(XMLStreamWriter writer,
Workspace workspace)
This is automatically called when saving a project file.
|
public void writeXML(XMLStreamWriter writer, Workspace workspace)
WorkspaceXMLPersistenceProvider
Your implementation must enclose all your data xml in a tag with the name
provided in your getIdentifier method.
writeXML in interface WorkspaceXMLPersistenceProviderwriter - XMLStreamWriter for xml serialization of this persistence
provider dataworkspace - Current workspace being serializedpublic void readXML(XMLStreamReader reader, Workspace workspace)
WorkspaceXMLPersistenceProvidergetIdentifier method.
Your implementation must detect the tag end element to stop reading.
readXML in interface WorkspaceXMLPersistenceProviderreader - XMLStreamReader for deserialization of this persistence
provider data previously serializedworkspace - Current workspace being deserializedpublic String getIdentifier()
WorkspacePersistenceProviderWorkspacePersistenceProvider.getIdentifier in interface WorkspacePersistenceProviderCopyright © 2007–2017. All rights reserved.