Package org.gephi.project.spi
Interface WorkspacePersistenceProvider
-
- All Known Subinterfaces:
WorkspaceBytesPersistenceProvider
,WorkspaceXMLPersistenceProvider
public interface WorkspacePersistenceProvider
Interface modules implement to notify the system they can read/write part of the .gephi project file to serialize states and data.How saving a project works
- The saving task is looking for all implementations of this interface
and ask each of them to write data either in XML or binary. Each
implementation is identified by its identifier, which is provided through
getIdentifier()
. - All of these elements are written in the .gephi project file.
How loading a project works
- The loading task is looking for all implementations of this interface
and asks for the identifier returned by
getIdentifier()
. - When traversing the gephi project document it call the provider read method.
Thus this interface allows any module to serialize and deserialize its data to gephi project files.
In order to have your
WorkspacePersistenceProvider
called, you must annotate it with@ServiceProvider(service = WorkspacePersistenceProvider.class, position = xy)
Theposition
parameter is optional but often useful when when you need otherWorkspacePersistenceProvider
data deserialized before yours.- Author:
- Mathieu Bastian
- See Also:
Workspace
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getIdentifier()
Unique identifier for yourWorkspacePersistenceProvider
.
-
-
-
Method Detail
-
getIdentifier
String getIdentifier()
Unique identifier for yourWorkspacePersistenceProvider
.- Returns:
- Unique identifier describing your data
-
-