27 transform cascara to json ld#100
Open
odungern wants to merge 17 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds JSON-LD export support, canonicalizes JSON-LD output, and refactors package caching so imported packages can persist across sessions.
Changes:
- Adds a central JSON-LD export dispatcher, key sorting, package graph/context JSON-LD transforms, and file-writing support.
- Reworks package cache usage from
usePackageCachetoPackageCachewith localStorage persistence. - Updates metamodel fixtures/tests for
cas:Icon→cas:iconand expands JSON-LD roundtrip coverage.
Reviewed changes
Copilot reviewed 34 out of 38 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
src/common/export/jsonld/getJSONLD.ts |
Adds central JSON-LD export dispatcher and package graph filtering. |
src/common/lib/helpers.ts |
Adds canonical JSON-LD key sorting helper. |
src/common/lib/platform-independence.ts |
Adds cross-platform PLI.writeFile() support. |
src/common/lib/messages.ts |
Adds/renumbers package validation and file-write messages. |
src/common/lib/mvf.ts |
Updates JSON-LD/XML vocabulary mappings for graph, icon, and unit. |
src/common/import/jsonld/import-jsonld.ts |
Uses new validation message code. |
src/common/schema/pig/ts/pig-metaclasses.ts |
Adds JSON-LD export transforms and adjusts datatype/default handling. |
src/common/schema/pig/ts/pig-package-constraints.ts |
Updates constraint documentation comments. |
src/common/schema/pig/ts/platform-independence.ts |
Adds an empty placeholder file. |
src/common/schema/README.md |
Adds brief schema folder documentation. |
src/stores/packageCache.ts |
Removes old package cache store. |
src/stores/package-cache.ts |
Adds persistent package cache store API. |
src/plugins/export/jsonld/export-jsonld.vue |
Replaces placeholder export dialog with JSON-LD export workflow. |
src/plugins/export/jsonld/README.md |
Adds JSON-LD export plugin documentation. |
src/plugins/import/xml/import-xml.vue |
Updates imports to use the new package cache API. |
src/plugins/import/reqif/import-reqif.vue |
Updates imports to use the new package cache API. |
src/plugins/import/jsonld/import-jsonld.vue |
Updates imports to use the new package cache API. |
src/components/PageDocument.vue |
Reads packages through the persistent cache. |
src/examples/writeFile-example.ts |
Adds examples for PLI.writeFile(). |
tests/unit/pig-metaclasses.spec.ts |
Updates JSON-LD @type expectations. |
tests/unit/pig-metaclasses-xml.spec.ts |
Updates XML tests for lowercase cas:icon. |
tests/unit/pig-metaclasses-jsonld.spec.ts |
Adds JSON-LD export roundtrip assertions. |
tests/data/XML/21/Project 'Very Simple Model (FMC) with Requirements'.cas.xml |
Removes cas:Icon property definition/references. |
tests/data/XML/11/Alice.cas.xml |
Removes cas:Icon property definition/references. |
tests/data/XML/05/Project 'Requirement with Enumerated Property'.cas.xml |
Removes cas:Icon property definition/references. |
tests/data/TTL/11/Alice.cas.ttl |
Updates TTL metamodel links and removes icon shape. |
tests/data/TTL/05/Project 'Requirement with Enumerated Property'.cas.ttl |
Renames cas:Icon to cas:icon. |
tests/data/JSON-LD/27/Dimmer - Semantically Integrated Specification (2021-01-28).cas.jsonld |
Renames JSON-LD icon fields. |
tests/data/JSON-LD/21/Project 'Very Simple Model (FMC) with Requirements'.cas.jsonld |
Renames JSON-LD icon fields. |
tests/data/JSON-LD/05/Project 'Requirement with Enumerated Property'.cas.jsonld |
Renames JSON-LD icon fields. |
public/assets/jsonld/Entity.json |
Updates schema property from cas:Icon to cas:icon. |
public/assets/jsonld/Relationship.json |
Updates schema property from cas:Icon to cas:icon. |
public/assets/index.html |
Adds heading IDs and updates wording. |
public/.htaccess |
Expands rewrite and cache-control configuration. |
public/assets/.htaccess |
Adds asset cache-control configuration. |
public/assets/xslt/ReqIF-to-CAS.sef.json |
Regenerates compiled ReqIF XSLT artifact. |
src/build-info.ts |
Regenerates build metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/GfSE/CASCaDE-Reference-Implementation/sessions/0063e9f8-cdc2-4fce-80f5-88fd9e5cf4b3 Co-authored-by: odungern <8947971+odungern@users.noreply.github.com>
- improved normalizeId() as a consequence - added a test-case for id normalization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The latest commits finalize the write-to-file-as-jsonld.