public class LegacyDataPersistenceProvider extends Object implements WorkspaceXMLPersistenceProvider
| Constructor and Description |
|---|
LegacyDataPersistenceProvider() |
| Modifier and Type | Method and Description |
|---|---|
String |
getIdentifier()
Unique identifier for your
WorkspacePersistenceProvider. |
void |
readData(XMLStreamReader reader,
org.gephi.graph.api.GraphModel graphModel,
LegacyMapHelper helper) |
void |
readEdgeData(XMLStreamReader reader,
org.gephi.graph.api.Edge edge) |
void |
readNodeData(XMLStreamReader reader,
org.gephi.graph.api.Node node) |
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 WorkspacePersistenceProviderpublic void readData(XMLStreamReader reader, org.gephi.graph.api.GraphModel graphModel, LegacyMapHelper helper) throws XMLStreamException
XMLStreamExceptionpublic void readNodeData(XMLStreamReader reader, org.gephi.graph.api.Node node) throws XMLStreamException
XMLStreamExceptionpublic void readEdgeData(XMLStreamReader reader, org.gephi.graph.api.Edge edge) throws XMLStreamException
XMLStreamExceptionCopyright © 2007–2017. All rights reserved.