112 add xml export and rework xml import - #114
Conversation
odungern
commented
Sep 4, 2026
- Improved the CASCaRA XML import
- Added the CASCaRA XML export
- changed from localStorage to indexedDB for persistence in the browser ... the former is too restrained in data volume.
- change text scripts to reflect new schema
…modifications, some in the import path and more the export.
- and the test-cases.
- refactoring to remove most lint warnings
- now using indexedDB instead of localStorage to persist data.
There was a problem hiding this comment.
🟡 Changes recommended
Two TypeScript files contain invalid comment delimiters that will break compilation, and several import UIs show a persistence warning that no longer matches the IndexedDB storage mechanism.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR extends CASCaRA’s interchange capabilities by adding a CASCaRA XML export, tightening/adjusting XML import handling and tests, and migrating browser persistence from localStorage to IndexedDB to support larger datasets.
Changes:
- Add a new CASCaRA XML export UI/plugin and update sample XML test artifacts.
- Rework XML import expectations (notably enumerations and idRef list wrappers) and update unit tests accordingly.
- Replace
localStorage-based package persistence with IndexedDB-backed persistence and adjust app bootstrap + import/export flows.
File summaries
| File | Description |
|---|---|
| tests/unit/pig-package-constraints-valueRanges.spec.ts | Updates XML enumeration tag naming in tests. |
| tests/unit/pig-metaclasses-xml.spec.ts | Updates metaclasses XML import tests to new list/idRef wrapper form and adds assertions. |
| tests/data/XML/21/Very_Simple_Model_(FMC)_with_Requirements.cas.xml.other | Adds/updates sample XML in alternative structure for regression/reference. |
| tests/data/XML/21/Very_Simple_Model_(FMC)_with_Requirements.cas.xml | Adds/updates sample XML in cas:aPackage structure. |
| tests/data/XML/21/Very Simple Model (FMC) with Requirements.cas.xml.new | Removes prior “.new” sample. |
| tests/data/XML/21/Very Simple Model (FMC) with Requirements.cas.xml | Removes prior sample with spaces in filename. |
| src/stores/package-cache.ts | Migrates persistence from localStorage to IndexedDB; adds initialization semantics and stronger persistence verification. |
| src/plugins/import/xml/import-xml.vue | Uses “Replace” semantics and calls cache replacement; adjusts error formatting. |
| src/plugins/import/xml/import-any-xml.vue | Same as above for “any XML” import flow. |
| src/plugins/import/reqif/import-reqif.vue | Same as above for ReqIF import flow. |
| src/plugins/import/jsonld/import-jsonld.vue | Same as above for JSON-LD import flow. |
| src/plugins/import/fmi/import-fmi.vue | Same as above for FMI import flow. |
| src/plugins/export/xml/mount-export-xml.ts | Adds plugin mount for XML export UI. |
| src/plugins/export/xml/export-xml.vue | Adds XML export dialog/UI and write-to-file flow. |
| src/plugins/export/ttl/export-ttl.vue | Removes redundant “load cache from storage” logic after bootstrap loading. |
| src/plugins/export/neo4j-api/export-neo4j.vue | Removes redundant “load cache from storage” logic after bootstrap loading. |
| src/plugins/export/jsonld/export-jsonld.vue | Removes redundant “load cache from storage” logic and adjusts getJSONLD call signature. |
| src/plugins/export/cypher/export-cypher.vue | Removes redundant “load cache from storage” logic after bootstrap loading. |
| src/main.ts | Loads package cache from persistent storage before mounting the app. |
| src/components/PageInterfaces.vue | Adjusts UI panel heights. |
| src/components/PageDocument.vue | Switches from cache.get() to synchronous cache.packages (aligned with pre-mount loading). |
| src/common/schema/pig/ts/pig-package-constraints.ts | Tightens typing around link instances for enumerated-link validation. |
| src/common/schema/pig/ts/pig-metaclasses.ts | Enhances XML-to-JSON conversion (idRef list wrappers, property/link parsing, normalization). |
| src/common/lib/helpers.ts | Improves typing for isArrayWithContent. |
| src/common/lib/definitions.ts | Adjusts minimum ID length. |
| src/common/import/xml/import-xml.ts | Adjusts XML import schema checks and error messaging logic. |
| src/common/import/reqif/import-reqif.ts | Improves error attribution and schema-check reporting. |
| src/common/import/fmi/import-fmi.ts | Removes unused logging import. |
| src/common/export/ttl/getTTL.ts | Minor signature change to ontology definition generation. |
| src/common/export/jsonld/getJSONLD.ts | Removes/parks options interface and simplifies export signature. |
| src/build-info.ts | Updates generated build metadata. |
| src/App.vue | Switches navigation items from href to router to. |
| public/assets/xslt/ReqIF-to-CAS.xsl | Tweaks generated title text formatting. |
| public/assets/xsd/skos.xsd | Adds minimal SKOS schema subset. |
| public/assets/xsd/rdf.xsd | Adds minimal RDF schema subset. |
| public/assets/xsd/Entity.xsd | Adds partial XSD for CASCaRA Entity metamodel XML. |
| public/assets/xsd/dcterms.xsd | Adds minimal Dublin Core Terms schema subset. |
| public/assets/xsd/common-types.xsd | Adds shared XSD types (IDs, idRef list wrapper). |
| public/assets/xml/cas-package.xsd | Removes previous monolithic XSD. |
| package.json | Bumps version. |
| package-lock.json | Updates lockfile version metadata. |
Review details
- Files reviewed: 41/44 changed files
- Comments generated: 8
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- added test-suite for getTtl - v0.2.16
|
Done testing all ready for merge! |
toddkleber
left a comment
There was a problem hiding this comment.
All done testing, all good!