Skip to main content

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

StepClassDescription
0ImportWizardStudyProfileStepChoose study profile / template
1ImportWizardSelectFilesStepSelect XLS or SAV source files (skipped if archives are pre-supplied)
2ImportWizardPreviewImportDataStepPreview raw data parsed from the source file
3ImportWizardPreviewEntitiesStepPreview mapped entity candidates (persons, orgs, roles, content types)
4ImportWizardSelectEntitiesStepSelect which entities to import
4aImportWizardCreateRolesStepCreate any missing roles required by the imported entities
5ImportWizardConfirmImportStepFinal review and trigger import
6ImportWizardSummaryStepSummary 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

PanelDescription
NewStudySourcePanelFileDrop zone for XLS/SAV files from disk
NewStudySourcePanelMyTemplateSelect a saved template from the user's template library
DataSourcePanelShared 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

StepClassDescription
0SureDriveWelcomeStepIntroduction and prerequisite check
1SureDriveNameStepEnter a name for the new SureDrive
2SureDriveStructureStepChoose structure source (empty or import from local folder)
3SureDrivePreviewImportDataStepPreview parsed structure/metadata data
4SureDrivePreviewEntitiesStepPreview mapped entities (categories, content types)
5ImportWizardCreateRolesStepCreate missing roles (shared with study import)
6SureDriveConfirmImportStepConfirm and trigger SureDrive creation
7ImportWizardSummaryStepReview summary

Structure source panels

PanelDescription
EmptySureDriveSourcePanelCreates an empty drive with no pre-loaded content model
LocalFolderSureDriveSourcePanelReads 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

StepClassDescription
0ImportPersonsIntroductionWizardStepIntroduction and instructions
1ImportPersonsSourceWizardStepSelect and validate source file; validates email addresses
2ImportPersonsDataWizardStepMap spreadsheet columns to Person/Org fields
3ImportPersonsUsersWizardStepOptionally create user accounts for imported persons
4ImportPersonsEmailRecipientsWizardStepSet notification email recipients
5ImportPersonsConfirmationWizardStepConfirm 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 Archive list
  • ExportFormat (archive output format)
  • ArchiveExportMode (full, partial, documents-only)
  • Password settings (from PasswordStep)
  • PDF metadata column selection
  • Email send parameters (SendEmailParams)

Steps

StepClassDescription
1SelectArchivesStepSelect archives to export; includes/excludes report documents
2ExportOptionsStepChoose export format, mode, path optimisation level
3SelectPdfMetadataStepChoose which PDF metadata columns to include
4PasswordStepOptionally 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

StepClassDescription
1ContentModelExportSelectContentStepSelect archives and content types to include
2ContentModelExportOptionsStepChoose format (XLS or OWL), destination path, and email options

Export outputs

FormatProduced by
Excel (.xls/.xlsx)DesktopExcelFormatter from suredms-xls-parser
OWL 2.0 (.owl)OntologyExporter from the connector's owl package

Entry points

Action classMenu location
ActionExportStudyContentModelStudy ribbon → Export menu
ActionExportSureDriveContentModelSureDrive 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/

ClassRole
OwlManagerDownloads .zip or .owl files from a URL or file path, extracts terminology, and builds a content model
OntologyParserExtends BaseOntologyParser<Category, ContentType, DataPropertyDef, AnnotationDef>. Maps OWL classes and data/annotation properties to desktop entity types
OntologyExporterWrites the current content model back to OWL format, mapping AnnotationDef.CATEGORY_CODE and AnnotationDef.TERM_TYPE annotation types
OWLParserImplements 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

ClassLocationPurpose
EntityExportUtils...ui/export/EntityExportUtils.javaShared utilities for serialising entity lists to CSV or XLS
ExportUsersDialog...ui/dialogs/user/ExportUsersDialog.javaExports user list (team members, system users) to XLS
ExportPersonsFromArchiveDialog...ui/wizard/exporter/person/ExportPersonsFromArchiveDialog.javaExports persons from a specific archive
ExportPersonsJob...ui/wizard/exporter/person/ExportPersonsJob.javaBackground job for person export, submitted to JobManager
EntityImportUtils...util/EntityImportUtils.javaUtilities for mapping imported entities to existing model objects