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

    1. 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().
    2. All of these elements are written in the .gephi project file.

    How loading a project works

    1. The loading task is looking for all implementations of this interface and asks for the identifier returned by getIdentifier().
    2. 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)
    The position parameter is optional but often useful when when you need other WorkspacePersistenceProvider data deserialized before yours.
    Author:
    Mathieu Bastian
    See Also:
    Workspace
    • Method Detail

      • getIdentifier

        String getIdentifier()
        Unique identifier for your WorkspacePersistenceProvider.
        Returns:
        Unique identifier describing your data