Skip to content

#3402 Fix empty GEXF export when a column is a TimestampSet or IntervalSet - #3403

Merged
mbastian merged 1 commit into
gephi:masterfrom
MattArtzAnthro:fix-gexf-export-timeset-column
Nov 21, 2026
Merged

mbastian merged 1 commit into
gephi:masterfrom
MattArtzAnthro:fix-gexf-export-timeset-column

Conversation

@MattArtzAnthro

Copy link
Copy Markdown
Contributor

Description

Fixes #3402: GEXF export writes an empty file when a column is a TimestampSet or IntervalSet.

Cause. Column.isDynamic() is true both for TimeMap columns (a value per time) and for TimeSet columns (a set of times). ExporterGEXF treated every dynamic column as a TimeMap, so for a regular attribute column of type TimestampSet the call to AttributeUtils.getStaticType threw IllegalArgumentException: Unsupported type org.gephi.graph.api.types.TimestampSet. execute() logs the exception, so the export ended with an empty document and no visible error. A spreadsheet edge list with a date column imports with exactly such a column.

Fix. The exporter uses isDynamicAttribute() where it means a value per time. A time-set column is declared as a static string attribute, and its value is written as text in the graph's time format (<[3.0, 6.0]>), which is what the spreadsheet exporter already writes for the same column. GEXF has no attribute type for a set of times. The timeset property is unchanged and is still written as timestamp, start/end or <spells>.

Test. GEXFTest.testTimestampSetColumn compares against a new expected file, gexf/timestampset_column.gexf, and testTimestampSetColumnDynamicGraph checks the column next to the timeset property. Both fail on master with the exception above. The ExportPlugin tests pass with checkstyle (42 tests).

Not changed.

  • On re-import the column comes back as a string column.
  • execute() still swallows exceptions, so other export failures remain silent.
  • IntervalSet takes the same path but has no test of its own: GraphGenerator.addIntervalSetColumn declares its column as TimestampSet, and I did not want to change the shared generator here.

Checklist

  • Merged with master beforehand

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed

Added to documentation?

  • 👍 README.md
  • 👍 API Changes
  • 👍 Additional documentation in docs
  • 👍 Relevant code documentation
  • 🙅 no, because they aren’t needed

The diagnosis, the fix, and the tests above were worked out together with Claude Code. I built, ran, and verified everything on my own machine, and I am happy to re-run any of it.

…ephi#3402)

ExporterGEXF treated every column where isDynamic() is true as a TimeMap. A regular attribute column of type TimestampSet or IntervalSet is also dynamic, so AttributeUtils.getStaticType threw, execute() logged it, and the exported file was empty. The exporter now uses isDynamicAttribute() where it means a value per time, and writes a time-set column as a string attribute holding its text form, as the spreadsheet exporter does.

Adds two tests in GEXFTest that fail without the change.

@mbastian mbastian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I also added a GEXF issue as we may actually want to add that to the schema gephi/gexf#33

@mbastian
mbastian merged commit 87386a2 into gephi:master Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GEXF export writes an empty file when a column is a TimestampSet or IntervalSet

2 participants