Skip to content

feat(dwc): DwC Mapping and Archive Export frontend#7943

Closed
foozleface wants to merge 1 commit intospecify:mainfrom
calacademy-research:cas/dwc-frontend
Closed

feat(dwc): DwC Mapping and Archive Export frontend#7943
foozleface wants to merge 1 commit intospecify:mainfrom
calacademy-research:cas/dwc-frontend

Conversation

@foozleface
Copy link
Copy Markdown
Collaborator

Contributed by @foozleface

Adds the React frontend for the DwC export pipeline: a Schema Mapping tool for building and editing DwC mappings, and an Archive Export tool for generating and downloading DwC Archives. Both are accessible from the User Tools menu (admin-only).

Implementation

  • DwC Mapping tool (User Tools > DwC Mapping, SchemaMapper/index.tsx):
    • List view showing all mappings with field completion stats (mapped/total)
    • Create new mapping (blank or from existing query via "Use Existing Query" option)
    • Full mapping editor (MappingEditor.tsx): assign DwC terms to query fields via searchable dropdown, auto-map button, duplicate term prevention, locked occurrenceID row
    • Clone and rename mappings (CloneMapping.tsx)
    • Delete with confirmation dialog
    • Term dropdown (TermDropdown.tsx) with grouped display (Occurrence, Event, Location, etc.) and IRI tooltips (TermTooltip.tsx)
    • Auto-map algorithm (autoMap.ts) matches field names to DwC terms using the vocabulary
    • Vocabulary dialog (VocabularyDialog.tsx) for browsing the full DwC term set
  • DwC Archive Export tool (User Tools > DwC Archive Export, ExportPackages/index.tsx):
    • List view of all archive packages with last-exported timestamp
    • Create archive from any core mapping (PackageForm.tsx), with export name and filename
    • Generate/download DwCA ZIP with progress indicator and elapsed timer
    • Clone archive packages (ClonePackage.tsx)
    • Import EML metadata from file, preview EML XML (EmlEditor.tsx)
    • Per-archive RSS toggle with copy-URL button (CopyRssUrl.tsx)
    • GBIF validator link (GbifValidator.tsx) for quick validation of downloaded archives
    • Delete with confirmation dialog
  • Routing (OverlayRoutes.tsx): two new overlay routes at /specify/overlay/schema-mapper/ and /specify/overlay/export-packages/
  • User Tools menu (userToolDefinitions.ts): replaces the old "Make DwCA" and "Update Export Feed" entries with "DwC Mapping" and "DwC Archive Export"
  • Localization (header.ts): new localization strings for all UI labels
  • Permissions: both tools check userInformation.isadmin and show a permission-denied dialog for non-admin users
  • Unit tests (__tests__/): tests for the auto-map algorithm, vocabulary parsing, and toolbar component

Note: Depends on the DwC backend PR being merged first.

This is part of the DwC export pipeline addressing issues #7709-#7748 (40 GitHub issues for Darwin Core Archive support).

Testing instructions

  • Log in as an admin user
  • Open the User Tools menu — verify "DwC Mapping" and "DwC Archive Export" appear under the Export section
  • Click "DwC Mapping" — verify the mapping list loads (empty if no mappings exist yet)
  • Create a new mapping: enter a name, select a context table, click Create
  • In the mapping editor: click "Auto Map" to auto-assign DwC terms, verify terms appear in the dropdowns
  • Manually assign a term via the dropdown — verify duplicate terms show a warning
  • Save the mapping, return to the list, verify the field count updates
  • Clone the mapping — verify a copy appears with "(clone)" suffix
  • Navigate to "DwC Archive Export" — create a new archive package using the mapping
  • Click "Generate & Download" — verify a DwCA ZIP downloads successfully
  • Toggle RSS on for the archive, copy the RSS URL, verify it returns valid XML
  • Log in as a non-admin user — verify both tools show a permission-denied message

@foozleface
Copy link
Copy Markdown
Collaborator Author

Superseded by the 7-PR atomic stack on issue-cas-* branches:

  1. issue-cas-7746: extensions join table + vocabulary on Schemamapping #8032 — issue-cas-7746: extensions table + vocabulary
  2. issue-cas-7737: CacheTableMeta model + cache table infrastructure #8033 — issue-cas-7737: CacheTableMeta + cache infrastructure
  3. issue-cas-7714: DwC schema terms vocabulary + permissions #8034 — issue-cas-7714: DwC schema terms vocabulary + permissions
  4. issue-cas-7709: Schema Mapper UI shell + Schema Config DwC section #8035 — issue-cas-7709: Schema Mapper UI shell + Schema Config DwC section
  5. issue-cas-7712: Clone endpoint + list APIs + Export Packages shell #8036 — issue-cas-7712: Clone endpoint + list APIs + Export Packages shell
  6. issue-cas-7710: Mapping UI features (NewMappingDialog, autoMap, toolbar) #8037 — issue-cas-7710: Mapping UI features (NewMappingDialog, autoMap, toolbar)
  7. issue-cas-7733: DwC export pipeline Phases 4-6 (DwCA, EML, GBIF, RSS) #8038 — issue-cas-7733: DwC export pipeline Phases 4-6 (DwCA, EML, GBIF, RSS)

The new stack:

@foozleface foozleface closed this Apr 27, 2026
@github-project-automation github-project-automation Bot moved this from 📋Back Log to ✅Done in General Tester Board Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

1 participant