Gephi Toolkit Javadoc

org.gephi.project.spi
Interface WorkspacePersistenceProvider

All Known Implementing Classes:
LayoutModelPersistenceProvider, PartitionModelPersistenceProvider, PreviewPersistenceProvider, StatisticsPersistenceProvider

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 asks to return an XML element that represents data for each workspace.
  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 XML document it tries to match markups with identifiers. When match, call this provider readXML() method with the XML element.
Thus this interface allows any module to serialize and deserialize its data to gephi project files.

Author:
Mathieu Bastian
See Also:
Workspace

Method Summary
 java.lang.String getIdentifier()
           
 void readXML(javax.xml.stream.XMLStreamReader reader, Workspace workspace)
           
 void writeXML(javax.xml.stream.XMLStreamWriter writer, Workspace workspace)
           
 

Method Detail

writeXML

void writeXML(javax.xml.stream.XMLStreamWriter writer,
              Workspace workspace)

readXML

void readXML(javax.xml.stream.XMLStreamReader reader,
             Workspace workspace)

getIdentifier

java.lang.String getIdentifier()

Gephi Toolkit Javadoc