Import and Export
This document covers the import and export wizards in the SureClinical Desktop Client, the study archive export pipeline, the content model export (XLS and OWL formats), and the person/organisation import flow.
Overview
All import/export wizards follow the shared WizardBuilder framework (see Desktop Client Shell). Each wizard composes a set of WizardStep instances, carries a context object through all steps, and runs the final operation as an AbstractJob submitted to JobManager.
Import/export source classes live in:
suredms-desktop-client/src/main/java/com/sureclinical/suredms/ui/wizard/importer/
suredms-desktop-client/src/main/java/com/sureclinical/suredms/ui/wizard/exporter/
Study Archive Import Wizard
Class: ImportWizardBuilder
Location: ...ui/wizard/importer/study/ImportWizardBuilder.java
Dialog size: 900 × 640
The study import wizard loads a SureDrive or eTMF study from an Excel workbook (.xls/.xlsx) or a SAV (SAVE archive) file into an existing or new archive.
Context
ImportContext carries state between all steps:
- Selected archive list (
List<ArchiveCtx>) - Parsed import data (raw cell matrix from XLS or SAV)
- Mapped entity lists (persons, organizations, content types)
- User selection of which entities to create/update
Steps
| Step | Class | Description |
|---|---|---|
| 0 | ImportWizardStudyProfileStep | Choose study profile / template |
| 1 | ImportWizardSelectFilesStep | Select XLS or SAV source files (skipped if archives are pre-supplied) |
| 2 | ImportWizardPreviewImportDataStep | Preview raw data parsed from the source file |
| 3 | ImportWizardPreviewEntitiesStep | Preview mapped entity candidates (persons, orgs, roles, content types) |
| 4 | ImportWizardSelectEntitiesStep | Select which entities to import |
| 4a | ImportWizardCreateRolesStep | Create any missing roles required by the imported entities |
| 5 | ImportWizardConfirmImportStep | Final review and trigger import |
| 6 | ImportWizardSummaryStep | Summary and optionally set archive permissions |
Steps 1 and 4a are conditional:
- Step 1 is skipped when the caller supplies a
List<ArchiveCtx>directly (e.g., from the navigator). - Step 4a is always included.
Source panel variants
| Panel | Description |
|---|---|
NewStudySourcePanelFile | Drop zone for XLS/SAV files from disk |
NewStudySourcePanelMyTemplate | Select a saved template from the user's template library |
DataSourcePanel | Shared layout wrapper hosting either source panel |
SureDrive Setup Wizard
Class: SureDriveSetupWizardBuilder
Location: ...ui/wizard/importer/suredrive/SureDriveSetupWizardBuilder.java
Dialog size: 900 × 640
The SureDrive setup wizard creates a new SureDrive archive and optionally pre-populates it with a folder structure from a local directory or from a blank template.
Context
SureDriveWizardContext carries:
- Drive name (pre-filled with
wizard.sureDriveNameStep.sureDriveNameDefaultPrefix) - Chosen structure source (empty or local folder)
- Parsed content model (categories, content types, metadata)
Steps
| Step | Class | Description |
|---|---|---|
| 0 | SureDriveWelcomeStep | Introduction and prerequisite check |
| 1 | SureDriveNameStep | Enter a name for the new SureDrive |
| 2 | SureDriveStructureStep | Choose structure source (empty or import from local folder) |
| 3 | SureDrivePreviewImportDataStep | Preview parsed structure/metadata data |
| 4 | SureDrivePreviewEntitiesStep | Preview mapped entities (categories, content types) |
| 5 | ImportWizardCreateRolesStep | Create missing roles (shared with study import) |
| 6 | SureDriveConfirmImportStep | Confirm and trigger SureDrive creation |
| 7 | ImportWizardSummaryStep | Review summary |
Structure source panels
| Panel | Description |
|---|---|
EmptySureDriveSourcePanel | Creates an empty drive with no pre-loaded content model |
LocalFolderSureDriveSourcePanel | Reads a local folder tree and maps it to SureDrive categories |
EmptySureDriveStructureHelper is the default helper passed to SureDriveConfirmImportStep when no structure is imported.
Person / Organisation Import Wizard
Class: ImportPersonsWizardBuilder
Location: ...ui/wizard/importer/person/ImportPersonsWizardBuilder.java
Dialog size: 1024 × 768
The person import wizard loads persons and optionally their user accounts from a spreadsheet (ImportPersonsSourceWizardStep uses ImportedPersonValidator with SureEmailAddressValidator for email validation).
Context
ImportPersonsWizardContext carries:
- Parsed person rows
- Mapped Person/PersonRole/Organization records
- User account creation options
- Email notification recipients
Steps
| Step | Class | Description |
|---|---|---|
| 0 | ImportPersonsIntroductionWizardStep | Introduction and instructions |
| 1 | ImportPersonsSourceWizardStep | Select and validate source file; validates email addresses |
| 2 | ImportPersonsDataWizardStep | Map spreadsheet columns to Person/Org fields |
| 3 | ImportPersonsUsersWizardStep | Optionally create user accounts for imported persons |
| 4 | ImportPersonsEmailRecipientsWizardStep | Set notification email recipients |
| 5 | ImportPersonsConfirmationWizardStep | Confirm and trigger import |
Post-import action
On performWizardAction(), ImportPersonsJob is submitted to JobManager. On completion, if not in test mode, the user is offered the option to open ArchiveVisibilityDialog to configure archive access for the newly imported persons.
Study / SureDrive Archive Export Wizard
Class: ExportWizardBuilder
Location: ...ui/wizard/exporter/study/ExportWizardBuilder.java
Dialog size: 900 × 700
The export wizard exports one or more archives (or a SureDrive) to a local file or email. The same ExportWizardBuilder handles both study and SureDrive exports — the sureDrive flag passed to the constructor switches the dialog header to wizard.exportSureDrive.
Context
ExportSettings carries:
- Selected
Archivelist ExportFormat(archive output format)ArchiveExportMode(full, partial, documents-only)- Password settings (from
PasswordStep) - PDF metadata column selection
- Email send parameters (
SendEmailParams)
Steps
| Step | Class | Description |
|---|---|---|
| 1 | SelectArchivesStep | Select archives to export; includes/excludes report documents |
| 2 | ExportOptionsStep | Choose export format, mode, path optimisation level |
| 3 | SelectPdfMetadataStep | Choose which PDF metadata columns to include |
| 4 | PasswordStep | Optionally password-protect the export file |
Export formats
ArchiveFormat and ExportFormat (from suredms-common) control the output file type. The export operation calls SureOperations Nuxeo automation endpoints via NuxeoClientPool.executeSilentRequest().
ArchivePathSettingDialog lets users configure the root folder mapping for path-optimised exports.
EmailBookmarkWizardBuilder is a lightweight variant that skips the file-to-disk step and sends the export directly via SendEmailParams.
Content Model Export Wizard
Class: ContentModelExportWizardBuilder
Location: ...ui/wizard/exporter/contentmodel/ContentModelExportWizardBuilder.java
Dialog size: 800 × 600
Exports the content model of one or more archives as either an Excel workbook or an OWL ontology file.
Steps
| Step | Class | Description |
|---|---|---|
| 1 | ContentModelExportSelectContentStep | Select archives and content types to include |
| 2 | ContentModelExportOptionsStep | Choose format (XLS or OWL), destination path, and email options |
Export outputs
| Format | Produced by |
|---|---|
Excel (.xls/.xlsx) | DesktopExcelFormatter from suredms-xls-parser |
OWL 2.0 (.owl) | OntologyExporter from the connector's owl package |
Entry points
| Action class | Menu location |
|---|---|
ActionExportStudyContentModel | Study ribbon → Export menu |
ActionExportSureDriveContentModel | SureDrive ribbon → Export menu |
After trigger, ContentModelExportWizardBuilder is instantiated with a list of DocNavTreeNode selections and optional SendEmailParams.
OWL Content Model Format
The OWL subsystem in suredms-desktop-client-connector provides an alternative representation of the SureClinical content model using the Web Ontology Language (OWL 2.0).
Classes
Located at:
suredms-desktop-client-connector/src/main/java/com/sureclinical/suredms/owl/
| Class | Role |
|---|---|
OwlManager | Downloads .zip or .owl files from a URL or file path, extracts terminology, and builds a content model |
OntologyParser | Extends BaseOntologyParser<Category, ContentType, DataPropertyDef, AnnotationDef>. Maps OWL classes and data/annotation properties to desktop entity types |
OntologyExporter | Writes the current content model back to OWL format, mapping AnnotationDef.CATEGORY_CODE and AnnotationDef.TERM_TYPE annotation types |
OWLParser | Implements ArchiveParser for OWL_V20 format — marked // NO_UCD (unused code) |
OWL API dependency
The subsystem uses org.semanticweb.owlapi (HermiT reasoner version 1.3.6) for ontology loading and parsing.
Current status
OWLParser is explicitly marked as unused code and is not invoked through any user-facing import flow. Content model export to OWL (via OntologyExporter) is active and is triggered through the Content Model Export Wizard. Content model import from OWL is implemented at the parser level but is not exposed in the production UI.
Application Configuration Import
Class: ApplicationConfigurationImportDialog
Location: ...configuration/ApplicationConfigurationImportDialog.java
A simpler non-wizard dialog that imports application configuration settings (preferences, look-and-feel, feature flags) from a saved configuration file. Complements ApplicationConfigurationHelper export functionality. See Desktop Client Shell for configuration details.
Entity Export Utilities
| Class | Location | Purpose |
|---|---|---|
EntityExportUtils | ...ui/export/EntityExportUtils.java | Shared utilities for serialising entity lists to CSV or XLS |
ExportUsersDialog | ...ui/dialogs/user/ExportUsersDialog.java | Exports user list (team members, system users) to XLS |
ExportPersonsFromArchiveDialog | ...ui/wizard/exporter/person/ExportPersonsFromArchiveDialog.java | Exports persons from a specific archive |
ExportPersonsJob | ...ui/wizard/exporter/person/ExportPersonsJob.java | Background job for person export, submitted to JobManager |
EntityImportUtils | ...util/EntityImportUtils.java | Utilities for mapping imported entities to existing model objects |