# thsa/datawarrior architecture

> Architecture diagram of the GitHub repository thsa/datawarrior, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thsa/datawarrior
- Repository: https://github.com/thsa/datawarrior

## Overview

DataWarrior is a desktop application for interactive data analysis and visualization, with native molecule and reaction data and cheminformatics features. The main user journey is to open or create a dataset, analyze or transform rows and chemical structures, then inspect results in tables and visualizations. The tree also shows filtering, database queries, macros, and plugins as distinct capabilities. The excerpts establish how a frame initializes its table model and list handler; many other module connections are not shown, so those branches are intentionally unconnected.

Main entry points: [`src/com/actelion/research/datawarrior/DataWarrior.java`](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/DataWarrior.java) (DataWarrior), [`src/com/actelion/research/datawarrior/DEFrame.java`](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/DEFrame.java) (Document frame), [`src/com/actelion/research/table/model/CompoundTableListHandler.java`](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/table/model/CompoundTableListHandler.java) (Row lists), [`src/com/actelion/research/table/model/CompoundTableModel.java`](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/table/model/CompoundTableModel.java) (Compound table)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_datawarrior["DataWarrior<br/>[DataWarrior.java]"]
  node_frame["Document frame<br/>[DEFrame.java]"]
end

subgraph group_data["Data workspace"]
  node_tablemodel[("Compound table")]
  node_record["Table records"]
  node_lists["Row lists"]
  node_fileio["File import/export"]
end

subgraph group_analysis["Analysis tools"]
  node_filters["Data filters"]
  node_data_tasks["Data operations"]
  node_visualization["Visual analysis"]
end

subgraph group_chem["Chemistry"]
  node_chem_tasks["Chemistry tasks"]
  node_molecule_viewer["Molecule viewer"]
  node_db_queries["Database queries"]
end

subgraph group_extensions["Extensions"]
  node_macros["Macro recording"]
  node_plugin_registry["Plugin registry"]
end

node_analyst(("Analyst"))

node_analyst -->|"analyzes data"| node_datawarrior
node_frame -->|"creates model"| node_tablemodel
node_frame -->|"creates handler"| node_lists
node_lists -->|"reads rows"| node_tablemodel
node_datawarrior -->|"supports visualization"| node_visualization
node_datawarrior -->|"supports cheminformatics"| node_chem_tasks
node_datawarrior -->|"supports molecule viewing"| node_molecule_viewer
node_datawarrior -.->|"analyzes data"| node_fileio
node_datawarrior -.->|"filters data"| node_filters
node_datawarrior -.->|"transforms data"| node_data_tasks
node_datawarrior -.->|"queries sources"| node_db_queries
node_datawarrior -.->|"records actions"| node_macros
node_datawarrior -.->|"loads plugins"| node_plugin_registry

click node_datawarrior "https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/DataWarrior.java"
click node_frame "https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/DEFrame.java"
click node_tablemodel "https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/table/model/CompoundTableModel.java"
click node_record "https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/table/model/CompoundRecord.java"
click node_lists "https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/table/model/CompoundTableListHandler.java"
click node_fileio "https://github.com/thsa/datawarrior/tree/master/src/com/actelion/research/datawarrior/task/file"
click node_filters "https://github.com/thsa/datawarrior/tree/master/src/com/actelion/research/datawarrior/task/filter"
click node_data_tasks "https://github.com/thsa/datawarrior/tree/master/src/com/actelion/research/datawarrior/task/data"
click node_visualization "https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/table/view/JVisualization.java"
click node_chem_tasks "https://github.com/thsa/datawarrior/tree/master/src/com/actelion/research/datawarrior/task/chem"
click node_molecule_viewer "https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/fx/JFXMolViewerPanel.java"
click node_db_queries "https://github.com/thsa/datawarrior/tree/master/src/com/actelion/research/datawarrior/task/db"
click node_macros "https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/task/DEMacroRecorder.java"
click node_plugin_registry "https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/plugin/PluginRegistry.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_datawarrior,node_frame toneBlue
class node_tablemodel,node_record,node_lists,node_fileio toneAmber
class node_filters,node_data_tasks,node_visualization toneMint
class node_chem_tasks,node_molecule_viewer,node_db_queries toneRose
class node_macros,node_plugin_registry,node_analyst toneIndigo
```

## Components

### Application

- [DataWarrior](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/DataWarrior.java): `src/com/actelion/research/datawarrior/DataWarrior.java`
- [Document frame](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/DEFrame.java): `src/com/actelion/research/datawarrior/DEFrame.java`

### Data workspace

- [Compound table](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/table/model/CompoundTableModel.java): `src/com/actelion/research/table/model/CompoundTableModel.java`
- [Table records](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/table/model/CompoundRecord.java): `src/com/actelion/research/table/model/CompoundRecord.java`
- [Row lists](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/table/model/CompoundTableListHandler.java): `src/com/actelion/research/table/model/CompoundTableListHandler.java`
- [File import/export](https://github.com/thsa/datawarrior/tree/master/src/com/actelion/research/datawarrior/task/file): `src/com/actelion/research/datawarrior/task/file`

### Analysis tools

- [Data filters](https://github.com/thsa/datawarrior/tree/master/src/com/actelion/research/datawarrior/task/filter): `src/com/actelion/research/datawarrior/task/filter`
- [Data operations](https://github.com/thsa/datawarrior/tree/master/src/com/actelion/research/datawarrior/task/data): `src/com/actelion/research/datawarrior/task/data`
- [Visual analysis](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/table/view/JVisualization.java): `src/com/actelion/research/table/view/JVisualization.java`

### Chemistry

- [Chemistry tasks](https://github.com/thsa/datawarrior/tree/master/src/com/actelion/research/datawarrior/task/chem): `src/com/actelion/research/datawarrior/task/chem`
- [Molecule viewer](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/fx/JFXMolViewerPanel.java): `src/com/actelion/research/datawarrior/fx/JFXMolViewerPanel.java`
- [Database queries](https://github.com/thsa/datawarrior/tree/master/src/com/actelion/research/datawarrior/task/db): `src/com/actelion/research/datawarrior/task/db`

### Extensions

- [Macro recording](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/task/DEMacroRecorder.java): `src/com/actelion/research/datawarrior/task/DEMacroRecorder.java`
- [Plugin registry](https://github.com/thsa/datawarrior/blob/master/src/com/actelion/research/datawarrior/plugin/PluginRegistry.java): `src/com/actelion/research/datawarrior/plugin/PluginRegistry.java`

### Other components

- **Analyst**

## Connections

- Analyst → DataWarrior: analyzes data
- Document frame → Compound table: creates model (evidence: `src/com/actelion/research/datawarrior/DEFrame.java`)
- Document frame → Row lists: creates handler (evidence: `src/com/actelion/research/datawarrior/DEFrame.java`)
- Row lists → Compound table: reads rows (evidence: `src/com/actelion/research/table/model/CompoundTableListHandler.java`)
- DataWarrior → Visual analysis: supports visualization (evidence: `src/com/actelion/research/datawarrior/DataWarrior.java`)
- DataWarrior → Chemistry tasks: supports cheminformatics
- DataWarrior → Molecule viewer: supports molecule viewing
- DataWarrior → File import/export: analyzes data (evidence: `src/com/actelion/research/datawarrior/DataWarrior.java`)
- DataWarrior → Data filters: filters data
- DataWarrior → Data operations: transforms data
- DataWarrior → Database queries: queries sources (evidence: `src/com/actelion/research/datawarrior/DataWarrior.java`)
- DataWarrior → Macro recording: records actions (evidence: `src/com/actelion/research/datawarrior/DataWarrior.java`)
- DataWarrior → Plugin registry: loads plugins (evidence: `src/com/actelion/research/datawarrior/DataWarrior.java`)
