Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CASCaRA-Validation-Tool",
"version": "0.2.8",
"version": "0.2.9",
"private": true,
"scripts": {
"prebuild": "node scripts/generate-build-info.js",
Expand Down
3 changes: 2 additions & 1 deletion public/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ <h2 id="cascara-schema-server-content">Content</h2>
<li>
<p>
<strong>JSON-LD Schemata:</strong> The versions as developed by the CASCaRA Submission Team:<br />
• <a href="./schema/2026-07-03/jsonld/">2026-07-03 (latest)</a><br />
• <a href="./schema/2026-07-20/jsonld/">2026-07-20 (latest)</a><br />
• <a href="./schema/2026-07-03/jsonld/">2026-07-03</a><br />
• <a href="./schema/2026-05-08/jsonld/">2026-05-08</a><br />
• <a href="./schema/2026-02-18/jsonld/">2026-02-18</a><br />
• <a href="./schema/2026-01-12/jsonld/">2026-01-12</a>
Expand Down
2 changes: 1 addition & 1 deletion public/assets/jsonld/Entity.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://product-information-graph.org/schema/2026-07-03/jsonld/Entity.json",
"$id": "http://product-information-graph.org/schema/2026-07-20/jsonld/Entity.json",
"title": "CASCaRA Entity Schema for JSON-LD",
"description": "Validates <strong>Entity</strong> class definitions for individual information objects. Configures which properties (cas:enumeratedProperty) and which outgoing links are allowed (cas:enumeratedTargetLink). Entities classify primary information objects such as Requirements, Components and Diagrams in a systems engineering context. Supports specialization hierarchies via cas:specializes and optional visual representation via cas:icon.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion public/assets/jsonld/Enumeration.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://product-information-graph.org/schema/2026-07-03/jsonld/Enumeration.json",
"$id": "http://product-information-graph.org/schema/2026-07-20/jsonld/Enumeration.json",
"title": "CASCaRA Enumeration Schema for JSON-LD",
"description": "Validates Enumeration class definitions. Must include datatype specification (string, integer, double, boolean, dateTime, etc.), enumeration values (cas:enumeratedValue), measurement units.",
"type": "object",
Expand Down
14 changes: 13 additions & 1 deletion public/assets/jsonld/Link.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://product-information-graph.org/schema/2026-07-03/jsonld/Link.json",
"$id": "http://product-information-graph.org/schema/2026-07-20/jsonld/Link.json",
"title": "CASCaRA Link Schema for JSON-LD",
"description": "Validates Link class definitions that specify navigable connections between items. Defines enumerated endpoint classes (cas:enumeratedEndpoint) which determine which Entity or Relationship classes can be connected via this link type. Links enable traversal of the information graph and support bi-directional relationships when paired (e.g., 'contains' / 'is contained by').",
"type": "object",
Expand All @@ -27,6 +27,10 @@
},
"additionalProperties": false
},
"sh:defaultValue": {
"$ref": "#/$defs/idObject",
"description": "Default value for this property"
},
"cas:revision": {
"type": "string",
"description": "Revision identifier for version control"
Expand Down Expand Up @@ -77,6 +81,14 @@
"$ref": "#/$defs/idObject"
}
},
"cas:revisionAware": {
"type": "boolean",
"description": "Indicates whether the link is version-aware. If true, instances must specify identifier and revision of the endpoints."
},
"dash:readOnly": {
"type": "boolean",
"description": "If true, the link value of an instance cannot be changed once assigned; default is false"
},
"sh:minCount": {
"type": "integer",
"minimum": 0
Expand Down
6 changes: 5 additions & 1 deletion public/assets/jsonld/Property.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://product-information-graph.org/schema/2026-07-03/jsonld/Property.json",
"$id": "http://product-information-graph.org/schema/2026-07-20/jsonld/Property.json",
"title": "CASCaRA Property Schema for JSON-LD",
"description": "Validates Property class definitions that specify attributes for entities and relationships. May include datatype specifications (string, integer, double, boolean, dateTime, etc.), cardinality constraints (sh:minCount, sh:maxCount, value constraints (sh:minInclusive, sh:maxInclusive, sh:maxLength, sh:pattern), default values, measurement units, and support for composed properties.",
"type": "object",
Expand Down Expand Up @@ -74,6 +74,10 @@
"sh:datatype": {
"$ref": "#/$defs/idObject"
},
"dash:readOnly": {
"type": "boolean",
"description": "If true, the property value of an instance cannot be changed once assigned; default is false"
},
"sh:minCount": {
"type": "integer",
"minimum": 0
Expand Down
2 changes: 1 addition & 1 deletion public/assets/jsonld/Relationship.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://product-information-graph.org/schema/2026-07-03/jsonld/Relationship.json",
"$id": "http://product-information-graph.org/schema/2026-07-20/jsonld/Relationship.json",
"title": "CASCaRA Relationship Schema for JSON-LD",
"description": "Validates <strong>Relationship</strong> class definitions for directed connections between entities. Configures which properties (cas:enumeratedProperty), source links (cas:enumeratedSourceLink) and target links (cas:enumeratedTargetLink) are allowed. Relationships are reified connections that can carry their own properties, enabling rich traceability and dependency modeling (e.g., 'Refinement' relationships with rationale and traceability status). Relationships classify meaningful statements including a subject and an object, where both the subject and the object is an entity or relationship instance. Supports specialization hierarchies and optional icons.",
"type": "object",
Expand Down
16 changes: 8 additions & 8 deletions public/assets/jsonld/aPackage.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://product-information-graph.org/schema/2026-07-03/jsonld/aPackage.json",
"$id": "http://product-information-graph.org/schema/2026-07-20/jsonld/aPackage.json",
"title": "CASCaRA aPackage Schema for JSON-LD",
"description": "Validates a complete JSON-LD document (CASCaRA aPackage) with @context (namespace and vocabulary definitions) as well as @graph (array of PIG items). The graph contains a mix of item classes (Property, Link, Entity, Relationship) and instances (anEntity, aRelationship). Package-level metadata includes optional dcterms:modified, dcterms:creator, dcterms:title, and dcterms:description. Validates each item against its corresponding schema based on cas:itemType.",
"type": "object",
Expand Down Expand Up @@ -127,7 +127,7 @@
}
},
"then": {
"$ref": "http://product-information-graph.org/schema/2026-07-03/jsonld/anEntity.json"
"$ref": "http://product-information-graph.org/schema/2026-07-20/jsonld/anEntity.json"
}
},
{
Expand All @@ -143,7 +143,7 @@
}
},
"then": {
"$ref": "http://product-information-graph.org/schema/2026-07-03/jsonld/aRelationship.json"
"$ref": "http://product-information-graph.org/schema/2026-07-20/jsonld/aRelationship.json"
}
},
{
Expand All @@ -159,7 +159,7 @@
}
},
"then": {
"$ref": "http://product-information-graph.org/schema/2026-07-03/jsonld/Property.json"
"$ref": "http://product-information-graph.org/schema/2026-07-20/jsonld/Property.json"
}
},
{
Expand All @@ -175,7 +175,7 @@
}
},
"then": {
"$ref": "http://product-information-graph.org/schema/2026-07-03/jsonld/Link.json"
"$ref": "http://product-information-graph.org/schema/2026-07-20/jsonld/Link.json"
}
},
{
Expand All @@ -191,7 +191,7 @@
}
},
"then": {
"$ref": "http://product-information-graph.org/schema/2026-07-03/jsonld/Entity.json"
"$ref": "http://product-information-graph.org/schema/2026-07-20/jsonld/Entity.json"
}
},
{
Expand All @@ -207,7 +207,7 @@
}
},
"then": {
"$ref": "http://product-information-graph.org/schema/2026-07-03/jsonld/Relationship.json"
"$ref": "http://product-information-graph.org/schema/2026-07-20/jsonld/Relationship.json"
}
},
{
Expand All @@ -223,7 +223,7 @@
}
},
"then": {
"$ref": "http://product-information-graph.org/schema/2026-07-03/jsonld/Enumeration.json"
"$ref": "http://product-information-graph.org/schema/2026-07-20/jsonld/Enumeration.json"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion public/assets/jsonld/aRelationship.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://product-information-graph.org/schema/2026-07-03/jsonld/aRelationship.json",
"$id": "http://product-information-graph.org/schema/2026-07-20/jsonld/aRelationship.json",
"title": "CASCaRA ARelationship Schema for JSON-LD",
"description": "Validates <strong>relationship instances</strong> representing directed, reified connections between items (i.e. entity or relationship instances). Similar metadata to entities, but additionally requires both source links (cas:aSourceLink) and target links (cas:aTargetLink) conforming to the class definition. Source and target links reference entity or relationship instances. Properties can carry contextual information about the relationship (e.g., traceability status, rationale, coverage analysis). Reification enables relationships to be first-class items with their own lifecycle and properties. Must have a dcterms:title and optionally a dcterms:description to convey meaning.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion public/assets/jsonld/anEntity.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://product-information-graph.org/schema/2026-07-03/jsonld/anEntity.json",
"$id": "http://product-information-graph.org/schema/2026-07-20/jsonld/anEntity.json",
"title": "CASCaRA AnEntity Schema for JSON-LD",
"description": "Validates <strong>entity instances</strong> with actual property values and target link references. Includes mandatory metadata: @type (reference to Entity class), cas:revision, dcterms:modified timestamp, optional cas:priorRevision and dcterms:creator. Properties can have direct values (@value) or reference enumeration values (@id) as defined by its class. Target links reference other entity or relationship instances. Must have either dcterms:title or dcterms:description (or both) to convey meaning.",
"type": "object",
Expand Down
Binary file removed public/assets/jsonld/styles-jsonld.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion public/assets/xslt/FMI-to-CAS.sef.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/assets/xslt/ReqIF-to-CAS.sef.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/build-info.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Auto-generated by scripts/generate-build-info.js - DO NOT EDIT
// Generated at: 2026-07-12T12:37:47.778Z
// Generated at: 2026-07-21T05:32:13.833Z

export const BUILD_INFO = {
// from package.json:
appName: 'CASCaRA-Validation-Tool',
appVersion: '0.2.8',
appVersion: '0.2.9',
// from Git:
buildTime: '2026-07-12T12:37:47.778Z',
gitCommit: '02f0f8b',
gitBranch: '28-transform-cascara-to-rdfturtle',
buildTime: '2026-07-21T05:32:13.833Z',
gitCommit: '52f1fcb',
gitBranch: '101-render-the-document-outline-with-collapsible-folders-per-tree',
gitDirty: false
};
2 changes: 1 addition & 1 deletion src/common/export/html/getHTML.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ function propertiesToHTML(el: TPigAnElement, lang: tagIETF): string {
for (const prop of el.hasProperty) {
const propData = prop.get() as IAProperty;
if (propData && propData.hasClass) {
const propValue = passify((propData.value || propData.idRef) as string); // one of the two must be present according to the schema
const propValue = passify((propData.value) as string);
const propClass = passify(propData.hasClass);
propertiesHTML += `<dt>${propClass}</dt><dd>${propValue}</dd>`;
}
Expand Down
26 changes: 13 additions & 13 deletions src/common/export/jsonld/getJSONLD.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@

let jld = this.getAsJSONLD(pkg, options);

jld = this.xConfigurablesToJSONLD(jld, pkg, 'hasProperty');
jld = this.xConfigurablesToJSONLD(jld, pkg, 'hasTargetLink');
jld = this.xConfigurables(jld, pkg, 'hasProperty');
jld = this.xConfigurables(jld, pkg, 'hasTargetLink');

jld['@context'] = xContextToJSONLD(pkg);
jld['@graph'] = xGraphToJSONLD(pkg);
jld['@context'] = xContext(pkg);
jld['@graph'] = xGraph(pkg);

/* ... coded by Copilot, but not yet tested:
// Filter graph items if itemType filter is specified
Expand Down Expand Up @@ -160,7 +160,7 @@
* Internal format: @context = [{ tag: "cas:", uri: "https://..." }, ...]
* JSON-LD format: @context = { "cas": "https://...", ... }
*/
function xContextToJSONLD(pkg: APackage): JsonObject {
function xContext(pkg: APackage): JsonObject {
const ctx = pkg.context;

if (!ctx || !Array.isArray(ctx)) {
Expand Down Expand Up @@ -200,7 +200,7 @@
* @param pkg - APackage instance
* @returns Array of JSON-LD items
*/
function xGraphToJSONLD(pkg: APackage): JsonObject[] {
function xGraph(pkg: APackage): JsonObject[] {
const graph = pkg.graph;

if (!graph || !Array.isArray(graph) || graph.length === 0)
Expand All @@ -224,8 +224,8 @@
static anEntity(itm: AnEntity, options?: IOptionsJSONLD): JsonObject {
let jld = this.getAsJSONLD(itm, options);

jld = this.xConfigurablesToJSONLD(jld, itm, 'hasProperty');
jld = this.xConfigurablesToJSONLD(jld, itm, 'hasTargetLink');
jld = this.xConfigurables(jld, itm, 'hasProperty');
jld = this.xConfigurables(jld, itm, 'hasTargetLink');
return this.sortJsonLdKeys(jld);
}

Expand All @@ -238,9 +238,9 @@
static aRelationship(rel: ARelationship, options?: IOptionsJSONLD): JsonObject {
let jld = this.getAsJSONLD(rel, options);

jld = this.xConfigurablesToJSONLD(jld, rel, 'hasProperty');
jld = this.xConfigurablesToJSONLD(jld, rel, 'hasTargetLink');
jld = this.xConfigurablesToJSONLD(jld, rel, 'hasSourceLink');
jld = this.xConfigurables(jld, rel, 'hasProperty');
jld = this.xConfigurables(jld, rel, 'hasTargetLink');
jld = this.xConfigurables(jld, rel, 'hasSourceLink');
return this.sortJsonLdKeys(jld);
}

Expand Down Expand Up @@ -302,13 +302,13 @@
* Transform hasProperty, hasSourceLink or hasTargetLink arrays for JSON-LD output.
* It is assumed that the native property names have already been renamed with MVF.renameJsonTags( ..., MVF.toJSONLD).
*/
private static xConfigurablesToJSONLD(
private static xConfigurables(
jld: JsonObject,
itm: TPigItem,
hasX: 'hasProperty' | 'hasSourceLink' | 'hasTargetLink'
): JsonObject {
const cfgs = (itm as any)[hasX];
// LOG.debug('xConfigurablesToJSONLD:', jld, itm, hasX, cfgs);
// LOG.debug('xConfigurables:', jld, itm, hasX, cfgs);
if (!Array.isArray(cfgs)) {
return jld;
}
Expand Down Expand Up @@ -488,7 +488,7 @@
}
return out;
}
private static getAsJSONLD(itm: TPigItem, options?: IOptionsJSONLD): JsonObject {

Check warning on line 491 in src/common/export/jsonld/getJSONLD.ts

View workflow job for this annotation

GitHub Actions / build (24.4.0)

'options' is defined but never used

Check warning on line 491 in src/common/export/jsonld/getJSONLD.ts

View workflow job for this annotation

GitHub Actions / build (24.4.0)

'options' is defined but never used
const jld = MVF.renameJsonTags(itm.get() as unknown as JsonObject, MVF.toJSONLD, { mutate: false }) as JsonObject;
return this.makeIdObjects(jld) as JsonObject;
}
Expand Down
Loading
Loading