This documents provides Gephi APIs documentation and gives details about current status of each API. Each API is categorized by it's stability: stable, under development or deprecated.


API Changes

0.9.3

Graph API

  • Add getEdges(int type) to Graph to allow retrieval of only edges of a specific type.
  • Add getEdgeTypeLabels(boolean) to GraphModel.
  • Add min/max to TimeSet and Element.getTimeBounds().
  • Add Column.exists() as new utility.
  • Add GraphLock to the API in Graph to expose locking states.
  • Make Table a Collection of Column.
  • Add new method Column.isDynamicAttribute().
  • Add toSet() in addition of toCollection() to element iterables.
  • Add new Table.countColumns(Origin) method.
  • Add getElementIndex() methods to GraphModel when providing a Table.
  • Add isNodeTable() and isEdgeTable() methods to Table.

Appearance API (under development)

  • Partition and Ranking now always receive the Graph as parameter for all methods that do need access to the underlying index to facilitate local scale support.
  • Add getColumn() to Ranking so it aligns with Partition.
  • Add getNormalizedValue() to Ranking to more easily retrieve the normalised value.
  • Partition now has a static DEFAULT_COLOR when the color is not found for a given value.
  • Removed Partition.setColors() as it was prone to confusion.
  • Add transformAll(Iterable) to Function.
  • Split isLocalScale() into isRankingLocalScale() and isPartitionLocalScale() in AppearanceModel.
  • Make Function getters in AppearanceModel independent from Graph as this should be handled automatically based on the local/global state.

Preview API

  • A postProcess() method has been added to the Renderer SPI to allow customization once all items have been rendered.

Archive

  • (September 08 2017) A new optional FileAware interface FileImporter in ImporterAPI. This allows file importers to receive the file to import in a setFile method instead of the setReader method being called. If your FileImporter implements this interface, setFile will be called, and setReader will not be called.
  • (February 07 2016) A new setColors method has been added to Partition in AppearanceAPI.
  • (January 28 2016) The SpigotImporter and SpigotImporterBuilder interfaces in ImportAPI have been renamed to WizardImporter and WizardImporterBuilder. Methods have been accordingly renamed in ImportController as well.
  • (January 03 2016) The FilterBuilder.getFilter() and CategoryBuilder.getBuilders() methods in FiltersAPI now take a Workspace as a parameter.
  • (December 08 2015) The functionalities of DynamicAPI have either been replaced by native GraphAPI support or added to the TimelineAPI, effectively removing DynamicAPI from the codebase. The TimeFormat can be set via setTimeFormat() on GraphModel. Estimators are now configurable per column and can directly be set from the Column. Obtaining the minimum time bounds can now be obtained from the TimeIndex directly from GraphModel.
  • (December 03 2015) The createQuery() method in FilterController now can also take a FilterBuilder instead of a Filter. It allows to track down builders down to the query level.
  • (November 25 2015) The ImportAPI now supports importing multiple graphs at the time and supports graph slices through an additional parameter on ContainerLoader. The setTimestamp() and setInterval() allows to define a point or period of existence for the entire graph. The ImportController also allow multiple containers to be processed through a new process() method. In parallel, ImporterUI now takes multiple importers and so does the Processor interface that now takes multiple containes.
  • (November 21 2015) The NodeFilter and EdgeFilter interfaces now inherit from a new ElementFilter so it's easier to create filters that work at the element level.
  • (November 21 2015) The filter() method in Operator now takes an array of Subgraph instead of Graph. This gives access to operations such as union or not.
  • (November 11 2015) Remove ClusteringAPI from codebase. It needs a complete rewrite.
  • (October 27 2015) Add ability to configure timezone with setTimeZone() on ContainerLoader in ImportAPI.
  • (October 10 2015) Remove standalone ContainerFactory class in ImportAPI and replace it with Container.Factory. Also add the ability to configure the TimeRepresentation in ContainerLoader. Finally, add color parsing utility in ImportUtils. It can be used to parse color names or codes.
  • (September 06 2015) The AttributeModel parameter in the execute() method of Statistics interface in StatisticsAPI has been removed as all features are now in GraphModel.
  • (August 26 2015) The ChangeListener in WorkspaceInformation has been replaced with a PropertyChangeListener.
  • (July 21 2013) Both RankingAPI and PartitionAPI have been replaced by a new AppearanceAPI, which supports both concepts. The SPI allows to create Transformer services, which can support either ranking or partition transformations. Ranking and Partition instances are defined in the API and gives access to underlying data. The core concept in appearance are functions, which wrap the transformation entirely and can be accessed in AppearanceModel.
  • (May 27 2013) The Processing dependency in PreviewAPI has been removed and replaced by regular Java2D. Therefore, the ProcessingTarget is now the G2DTarget. Also add a resize() method to facilitate integration.
  • (May 13 2013) Addition of a EdgeWeightMergeStrategy enum to control the way parallel edge weights are merged in ImportAPI.
  • (May 12 2013) Add ability to create WorkspacePersistenceProvider with a new SPI interface: WorkspaceBytesPersistenceProvider. The XML-based interfce has being renamed into WorkspaceXMLPersistenceProvider.
  • (April 15 2013) Importers can now use the setValueString() method on ElementDraft. This will automatically parse the value based on the declared type reducing parsing code on the importer side. If the type is already in the right type, use the setValue() instead.
  • (April 07 2013) Refactoring of the import API. Introduction of a ColumnDraft interface which represents a to-be-created column and the method to manipulate them in ContainerLoader. The NodeDraft and EdgeDraft classes now inherits from a new ElementDraft, centralizing a lot of the code. The EdgeDraftGetter and NodeDraftGetter have been removed and their methods moved directly to the node/edge draft. New elements are now created using the ElementDraft.Factory, which can be obtained with the factory() method on ContainerLoader. Previously the ContainerUnloader returned an AttributeModel. This has been replaced with iterables over column drafts. The EdgeDefault enum becomes EdgeDiretionDefault and represents a graph-level configuration. The EdgeDefault is now edge-level configuration and can be set by setEdgeDirection() on EdgeDraft. Finally, convenient setColor() methods have been added to ElementDraft.
  • (April 07 2013) Complete rewrite of the GraphAPI and add GraphStore as dependency. The new API is entirely defined in the GraphStore project and Gephi makes it available through the GraphAPI. The AttributesAPI functionalities have been consolidated into the new graph API and therefore has been removed. There is too many API changes to be listed all but notable ones are the following.
    • All attribute features (e.g. add column) are now directly accessible from the GraphModel, and there's no more AttributeModel.
    • The AttributeColumn is renamed into Column, the AttributeTable is renamed into Table, AttributeOrigin is renamed into Origin and the AttributeType has been replaced by the direct usage of Class objects. Moreover, the AttributeUtils is now entirely static (i.e. no more needed to obtain an instance) and has multiple important additions such as full parse support.
    • The support for hierarchical graphs has been removed, but multi-graph support added. Each edge now can have a relationship type, and is zero by default. These types can be associated with an arbitrary label object, which can be configured in GraphModel.addEdgeType().
    • All node/edge data are now directly accessible from the interface. For instance, attribute values can be retrieved with the getAttribute() methods. All properties such as color or position are also accessible directly on the Node/Edge interfaces.
    • Dynamic graphs can now be represented with timestamps as well. Intervals are still supported but the API user must configure the preferred representation through the Configuration (must be done at initialization). The way elements' existence overtime has been greatly simplified with the addition of timestamp/interval management methods on Element, which both Node and Edge extends. See for instance addTimestamp(), addInterval(), getTimestamps() or getIntervals(). Similarly, each attribute getter or setter in Element is available with timestamps and intervals parameters so attribute values over time can be configured. Behind the scenes, the dynamic types used are defined in org.gephi.graph.api.types.
    • There's a new Subgraph interface that extends Graph and is available from GraphModel.getGraph(GraphView). This subgraph interface has additional features such as union() or intersection().
    • The graph listening system with GraphListener has been entirely replaced with a pull-based system of observers. The system no longer sends events at each update but listeners can create observers, which periodically check if something has changed. There's multiple types of observers: GraphObserver for topology changes, TableObserver for new/removed columns and ColumnObserver for attribute value changes. These observers can obtain diff objects such as GraphDiff or TableDiff to exactly obtain what has changed.
  • (December 07 2012) Add support for mouse listeners in Preview plugins. Create a PreviewMouseListener and implement MouseResponsiveRenderer interface in the renderers that use the listener.
  • (April 10 2012) Add a getShortDescription() method to the StatisticsUI API. It enables to get a short description of statistics (used to display tooltips).
  • (March 26 2012) Add a needsItemBuilder method to Renderer in Preview API. This helps to avoid building unnecessary items while refreshing preview.
  • (March 19 2012) Preview API changes:
    Added a getDisplayName method to Renderer and support for extending default preview renderers.
    Added a renderer manager to preview controlled with new methods in PreviewModel and PreviewController.:
  • (March 04 2012) Add a local scale flag in Ranking API. The value can be set from theRankingController.
  • (March 01 2012) Add RangeFilter interface in Filters API to help create range filters. The filter system now automatically manage the range values and bounds. The Range object now also supports exclusive intervals.
  • (February 29 2012) Add a new AttributableFilter filter type. This is useful for filters manipulating Attributable objects regardless whether they belong to a node or edge. Also note new useful abstract plugin implementations have been added to the FiltersPlugin module. Use AbstractFilter for any filter and AbstractAttributeFilter for filters based on attributes. Filter builders are also provided.
  • (February 26 2012) Update to Netbeans Platform 7.1 and it's new perspective system. The PerspectiveMember SPI has to go away and will break compatibility. Top components now directly declare the perspective they belong to in the @TopComponent.Registration annotation, for instance roles = {"overview"} for the Overview perspective.
  • (February 08 2012) Add a REPLACE_COLUMN event type in AttributeEvent.
  • (January 18 2012) New Timeline API exposed as a stable API. Th API controls the Timeline UI component and the animation framework.
  • (January 15 2012) Add a new TIME_FORMAT event in DynamicModelEvent. The event is triggered when the time format is initialized.
  • (December 14 2011) Add a new PerspectiveAPI module and move API/SPI interfaces from the DesktopPerspective module. Add a PerspectiveController to find and manage perspectives.
  • (November 07 2011) Add a getGraphTable() in the AttributeModel. The GraphView elements can also have attributes using the same system as nodes and egdes. The data can be accessed through the Graph.getAttributes() method.
  • (October 18 2011) Changes in the DesktopPerspective SPI. Modules willing to declare a panel part of a perspective should implement the PerspectiveMember interface. The interface now asks for the TopComponent's ID.
  • (September 01 2011) Complete rewrite of the Preview API with a new SPI which allows to extend the Preview with new renderers, item builders or render targets. The API also now offers better customization through a central property system and is optimized for external applications as well. The API is also now considered as stable.
  • (August 28 2011) New DynamicStatistics SPI in the StatisticsAPI module. The interface extends Statistics and implement the calculation of metrics over time.
  • (August 24 2011) Important changes in graph events breaking API compatibility. The ADD_NODES and ADD_EDGES are merged into a ADD_NODES_AND_EDGES event. Similarly REMOVE_NODES and REMOVE_EDGES are merged into a REMOVE_NODES_AND_EDGES event. GraphEventData remains the same and still contains both added/removed nodes and edges. Users may simply test if arrays returned by addedNodes(), addedEdges(), removedNodes() and removedEdges() are null before using them.
  • (August 22 2011) Add new executeLayout(numIterations) method in LayoutController.
  • (August 20 2011) The StatisticsController now supports synchronous algorithm execution through the execute(Statistics) method.
  • (August 13 2011) Add new startAutoTransform() and stopAutoTransform() in Ranking API to control auto transformations. The model also allows to retrieve the ranking used in the auto transformation. An additional refreshRanking() method has been added in the RankingBuilder SPI for a smoother auto transformation support.
  • (July 26 2011) Added a new AttributeRowsMergeStrategy interface to Data Laboratory API. This is a type of manipulator that defines and strategy for merging values of a row (node or edge) for an specific column. It should be used by other manipulators such as NodesManipulator MergeNodes
  • (July 19 2011) Complete refactoring of the Ranking API to improve modularity and reach a stable version of the API. The API now also has an SPI for ranking builders and transformers. Instead of getNodeRanking() and getEdgeRanking in the model, we introduce the concept of element type and generalize methods to it. Use Ranking.NODE_ELEMENT to obtain a node ranking and Ranking.EDGE_ELEMENT for an edge ranking. Same idea for transformers, which are now defined by a unique name. Default transformers' name can be found in the Transformer interface. A RankingEvent has also been created. API users have to update to their client code to be compatible.
  • (July 18 2011) Add a new interface nodes and edges share: Attributable. That allows to manipulate objects with attributes regardless if the object is a node or an edge. Node, Edge, NodeData and EdgeData now now implements this interface, and a getAttributes() method has been added to Node and Edge to make development easier.
  • (April 6 2011) Add setCurrentQuery() method on FilterController.
  • (February 21 2011) Important change how modules save/load data into project files. The WorkspacePersistenceProvider interface from ProjectAPI now uses StAX instead of DOM. The writeXML() method now uses XMLStreamWriter and readXML() XMLStreamReader. Backward compatibility can't be assured, modules have to use switch to StAX.
  • (February 11 2011) Added support of shortcut keys, availability of items and sub-items creation to Data Laboratory context menu actions (NodesManipulator and EdgesManipulator). Also now Visualization API has an SPI for adding context menu actions (GraphContextMenuItem) to nodes like DataLaboratory does with NodesManipulator. Note that they share the interface ContextMenuItemManipulator from Data Laboratory API, so they are compatible, being able to reuse actions on nodes for Overview and Data Laboratory.
  • (December 19 2010) Add removeMetaEdge(Edge) to manually remove meta edges. Add getTotalEdgeCount() method to globally count the number of edges, regardless if the edge is proper or meta.
  • (October 12 2010) Add methods in Graph API to better combine edges and meta edges features. Add getEdgesAndMetaEdges(Node) and getTotalDegree(Node) methods, as well as their in and out variants for HierarchicalDirectedGraph.
  • (September 06 2010) Add a flatten() method to HierarchicalGraph to flatten the hierarchical graph and transform meta edges into regular edges.
  • (September 05 2010) Add destroy(Filter filter) in FilterBuilder to receive notification when a filter query is removed and clean-up.
  • (September 01 2010) Add MetaEdgeBuilder in Graph SPI to allow custom builders. Add GraphSettings.setMetaEdgeBuilder() in the graph model settings.
  • (August 26 2010) Modify StatisticsModel to store reports directly instead of Statistics instance. As a consequence, the model has now a getReport() and a getResult() method that UI can use. The currently running statistics can now be get with a new getRunning() method.
  • (August 19 2010) Simplify and improve attribute events management. Event listeners now subscribe directly from the AttributeModel instead of AttributeTable and will receive events for all tables. Refactoring of the AttributeEvent class with AttributeTable as source and a new AttributeEventData object as data. A new SET_VALUE has been implemented for getting events when attribute values are set.
  • (August 18 2010) Changes in AttributeRowFactory, the newNodeRow() method now takes the owner object NodeData as a parameter. Similarly for newEdgeRow() and newRowForTable().
  • (August 17 2010) Add getEdge(Node, Node) in GraphAPI for consistency reasons.
  • (August 15 2010) Changes in Processor SPI. The Processor has now setters instead of a process() method with parameters. How processors are created remains the same. Creation of a ProcessorUI interface for processors settings configuration. A ProcessorUI implementation provides a panel, which is shown when the import report is closing. The ProcessorUI also allows to disable a processor with some conditions.
  • (August 13 2010) Add getColor() method in NodeDraft and EdgeDraft.
  • (July 19 2010) Define the "Overview, "Data Laboratory" and "Preview" as perspectives. Create a new SPI for perspecives and perspective members. Members are simply the TopComponent that belong to a perspective. Plugins can implement PerspectiveMember to define the open and close behaviour.
  • (July 16 2010) Add list/array types in Attributes API. All native types has now a related list type, except dynamic types. The list types inherits from AbstractList.
  • (July 15 2010) Changes in the way Import API deals with time intervals and dynamic data. Support for dynamic attributes has been added with a new addAttributeValue() method in NodeDraft and EdgeDraft. For improving data cleanup possibilities, NodeDraftGetter and EdgeDraftgetter now returns an AttributeRow instead of a list of attribute values only. Finally to profit from latest improvements, draft elements returns directly a TimeInterval type instead of the list of slices. Methods with 'Slice' have been renamed to 'Interval' for consistency reasons.
  • (July 14 2010) Add dynamic types into Attributes API. Dynamic types store values with a time interval and query can be customized with estimators. All dynamic types inherit from DynamicType
  • (June 18 2010) Graph API event management improvements. The GraphEvent has now precise events, including ADD_NODES, REMOVE_NODES, ADD_EDGES, REMOVE_EDGES and VISIBLE_VIEW. A new GraphEventData interface has been created to retrieve elements related to the events.
  • (June 14 2010) Export API refactoring, inspired from ImportAPI. Create an ExporterBuilder interface for exporter creation and different exporters: GraphExporter, VectorExporter, ByteExporter and CharacterExporter that covers common cases. The way exporters write data has been rationalized by using either java.io.Writer (text) or java.io.OutputStream (byte). The ExportController has been improved to support all use-cases, including file, writer and stream export.
  • (June 11 2010) Add Spigot support to the ImportAPI and SPI. Like DatabaseImporter, the SpigotImporter interface is a new type of Importers. Modifications have also be made to the ImportController to support spigot import.
  • (June 08 2010) Refactoring and improvements in the Import API and SPI. The refactoring aim is to solve the singleton issue with importers and let users implement builders interface that create importers instance. Therefore an ImporterBuilder interface has been created and should be registered with the @ServiceProvider annotation. The various importers types have been simplified and leave more choice to the implementations about how the input is managed. XML and Text file importers has been merged in a FileImporter interface, working with the java.io.Reader. Utility static methods, for instance get Document from Reader can now be found in a new ImportUtils class. The ImportController has been simplified for File import and now accepts java.io.Reader also. The main improvement on these modules in the support of UI components for importers. The aim is to let importers define an ImporterUI implementation to manage settings of these importers.
  • (June 04 2010) Improvements in the GraphAPI identifiers management. The system is now storing String identifiers coming from users. New getters and setters methods have been created in Graph:
    • Graph.setId(Node, String)
    • Graph.setId(Edge, String)
    • Graph.getNode(String)
    • Graph.getEdge(String)
    The NodeData.setId() and EdgeData.setId() methods have been removed, compatibility can't be kept. Factory has also be changed to allow to create elements with String ID directly, as it's not possible anymore to do it from NodeData.
  • (June 02 2010) Changes in AttributesAPI with event management. The lookup system in AttributeTable has been replaced by a more traditional event management system, with new AttributeEvent and AttributeListener interfaces. The dispatch implementation is also now on a separate thread.
  • (May 08 2010) Changes in Import modules to separate core and user interfaces. The ImportController is now doing import task only and a new ImportControllerUI is displaying the user interface (Report Panel). The ImportControllerUI interface is located in the DesktopProject module and should be user to properly import file from Plugins. The ImportController methods could be used from the toolkit.
  • (April 30 2010) Change FilterController.filter() to FilterController.filterVisible() and FilterController.select() to FilterController.selectVisible(). The controller is managing this process in a separate thread, with progress, and takes care of properties change. A more simple direct way to filter is required for headless access. The FilterController.filter() has been created and return the GraphView builded by the filter process.
  • (April 24 2010) Expose basic visualization features in a newly created Visualization API. No proper visualization API exists but its creation is necessary to avoid implementation module dependencies.
  • (April 17 2010) In PreviewAPI, the background color has been put in the PreviewModel. The PreviewController has been updated as well.
  • (March 28 2010) Add a doImport() method in ImportController that accepts InputStream. In ImportAPI also, add getWeight() in EdgeDraft to let importers increment weight. New AttributeUtils methods. Progress in GraphAPI and ImportAPI documentation.
  • (Feb 17 2010) Change in ImportAPI to support bounded time intervals. Add methods that manage TimeIntervalMin and TimeIntervalMax. Changes in GraphAPI about elements counting. Henceforth only enabled elements are counted, in node and edge counting, but also in degree methods. This counting is more logical, as it match with the number of elements returned by getNodes() and getEdges().
  • (Feb 7 2010) Initial import, for 0.7alpha milestone. Half of APIs are fully documented and the rest needs to be soon. Expose only Core APIs, that plugins could need by now. Friend packages exists, in particular between Plugin and PluginUI modules but they are not shown here. Netbeans APIs documentation dependencies are missing, thus see Netbeans API Index. Due to early development status, most of APIs are still marked as under development. Moreover APIs marked as stable are also suspected to change, but with much less impact than ones marked as under development.

API List

  • Appearance API - API/SPI for ranking and partition data to transform values in visual signs like color or size.
  • DataLaboratory API - API/SPI for data laboratory features (columns manipulation, edit, ...).
  • Export API - Export API/SPI provides the infrastructure for exporting data to any support and define new exporters.
  • Filters API - API/SPI for filters, define and control current filtering.
  • Generator API - Generator API/SPI provides the way to create and execute graph generators.
  • Graph API - API for accessing the graph.
  • Import API - Import API/SPI provides the import workflow to import data form any support.
  • Layout API - Layout API/SPI provides real-time layout algorithms execution.
  • LongTask API - LongTask API provides utility features for long and asynchronous task execution.
  • Perspective API - API/SPI for perspective management. Only related to the user interface.
  • Preview API - API for building the graph preview structure.
  • Project API - Project API/SPI for project and worskpaces manipulation.
  • Statistics API - Statistics and Metrics API/SPI provides (a)synchronous algorithms execution.
  • Timeline API - API which provides access to the timeline component data, time interval, settings and animation.
  • Tools API - Tool API/SPI defines interactive actions users can make with the visualization.
  • Visualization API - API/SPI for interacting with visualization and providing context menu actions.
Packages 
Package Description
org.gephi.appearance.api
API for manipulating element appearance.
org.gephi.appearance.spi
Interfaces that define the different ways the appearance of elements can be transformed.
org.gephi.datalab.api
Data Laboratory API, all capabilites are exposed through various controllers.
org.gephi.datalab.api.datatables  
org.gephi.datalab.spi
Interfaces for creating data laboratory plugins.
org.gephi.datalab.spi.columns  
org.gephi.datalab.spi.columns.merge  
org.gephi.datalab.spi.edges  
org.gephi.datalab.spi.general  
org.gephi.datalab.spi.nodes  
org.gephi.datalab.spi.rows.merge  
org.gephi.datalab.spi.values  
org.gephi.filters.api
API for graph filtering.
org.gephi.filters.spi
Interfaces for creating new filter classes.
org.gephi.graph.api
Complete API description, where GraphModel is the entry point.
org.gephi.graph.api.types
Custom types the API supports, in addition of primitive and arrays.
org.gephi.graph.spi
SPI interfaces clients can implement to extend the API.
org.gephi.io.exporter.api
API for exporting data to any support.
org.gephi.io.exporter.spi
Interfaces for creating new data exporters.
org.gephi.io.generator.api
API for executing graph generators in a backgorund thread.
org.gephi.io.generator.spi
Generator interfaces that plugins implement to add new generators.
org.gephi.io.importer.api
API for importing data from any support.
org.gephi.io.importer.spi
Interfaces for creating new data importers.
org.gephi.io.processor.spi
Interfaces that define the way data are unloaded from container and appened to the workspace.
org.gephi.layout.api
API for real-time layout algorithm tasks and proper user control.
org.gephi.layout.spi
Interfaces for creating new layout algorithms.
org.gephi.perspective.api
API for perspective management.
org.gephi.perspective.spi
Interfaces for creating new perspectives and perspective members.
org.gephi.preview.api
API for Preview rendering.
org.gephi.preview.spi
Interfaces for creating new renderers, item builders and render targets.
org.gephi.preview.types
Additional property types.
org.gephi.preview.types.editors
Standard beans property editors for preview types.
org.gephi.project.api
API for project and workspace management.
org.gephi.project.spi
SPI for workspace capabilities and project managment UI.
org.gephi.statistics.api
API for statistics and metrics tasks execution.
org.gephi.statistics.spi
Interfaces for creating new statistics and metrics algorihms.
org.gephi.timeline.api
API which controls the Timeline, the UI component which allows network exploration over time.
org.gephi.tools.api
API for selecting the current Tool.
org.gephi.tools.spi
Tools are functions for interacting with user inputs on the visualization window.
org.gephi.utils.longtask.api
API any module can use for providing long, asynchronous tasks execution.
org.gephi.utils.longtask.spi
LongTask adds functionalities to any class that wants to be progressable and cancellable.
org.gephi.utils.progress
Progress support for long tasks execution.