Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
e68216c
Improved the XSL for ReqIF transformation
odungern Mar 11, 2026
93148ac
Merge pull request #84 from GfSE/dev
odungern Mar 11, 2026
ee6f898
replaced all namespaces pig: by a constant defined in DEF
odungern Mar 12, 2026
a3beb6a
namespace prefix dcterms: replaced by global constant via DEF
odungern Mar 12, 2026
2cdd8d3
create JSON schemata with a factory, so that the JSON-LD schemata can…
odungern Mar 12, 2026
63f49f7
Platform-independence: Change name from PIN to PLI for better underst…
odungern Mar 12, 2026
fb1909e
XML import with user-supplied transformation
odungern Mar 13, 2026
d13f3f1
Refactored error messages for import-xml
odungern Mar 13, 2026
f61c34a
Reworked the control flow in case of failed constraint check: Graph i…
odungern Mar 13, 2026
d14e1e4
set v0.1.3
odungern Mar 13, 2026
dbd796d
removed some assigned but unused values from the active code.
odungern Mar 13, 2026
57dfd04
first steps towards marriage with ontology.
odungern Mar 19, 2026
08036dd
intermediate step zowards marriage with ontology
odungern Apr 11, 2026
86c6d8c
Reworked json schemata and metaclasses towards marriage with ontology.
odungern Apr 13, 2026
024a569
Merge pull request #91 from GfSE/docs
odungern Apr 25, 2026
4eecee8
removed compile errors
odungern Apr 25, 2026
b6c7f67
v1.2.0 metamodel refined:
odungern May 10, 2026
fa59824
finished v0.2.0 with the following changes:
odungern May 12, 2026
2d93111
updated landing page of schema server
odungern May 13, 2026
a232efa
Merge branch 'dev' into 79-rename-all-namespaces-pig-to-cas
odungern May 13, 2026
6127011
fix(home): add noopener noreferrer to external links
Copilot May 13, 2026
5d7cf5c
chore: revert generated files from previous commit
Copilot May 13, 2026
0e8d44f
implemented suggestions of Copilot review - except 2 which are based …
odungern May 13, 2026
a753c22
some comments updated
odungern May 13, 2026
5c22213
update landing page of the schema server.
odungern May 13, 2026
e2f1fbf
minor change: correct and align native JSON schema for Relationship.
odungern May 13, 2026
6ff409f
Merge pull request #93 from GfSE/79-rename-all-namespaces-pig-to-cas
csaenz-psg May 13, 2026
c791fb9
Reworked the logic of enumeratedXX in the classes:
odungern May 13, 2026
c40a95b
Update schemata and metaclasses to align with specification.
odungern May 15, 2026
6d36e19
some refactoring and aligning the test-cases with the latest metamode…
odungern May 15, 2026
decf038
some corrections following suggestions of Copilot review on a pull-re…
odungern May 15, 2026
9ba06e1
Merge pull request #95 from GfSE/27-transform-cascara-to-json-ld
odungern May 15, 2026
a88ab30
Removed dependency of pig-metaclasses from exportHTML.
odungern May 17, 2026
cf0025a
add a global function toHTML() accepting all itemTypes.
odungern May 17, 2026
b83a0c0
rename module exportHTML.ts to toHTML.ts
odungern May 17, 2026
99ee4aa
Merge pull request #96 from GfSE/docs
odungern May 17, 2026
685ef41
update index.html of schema server
odungern May 17, 2026
b1f69b5
Rename project to CASCaRA and add collaboration rules
odungern May 17, 2026
950010a
Merge remote-tracking branch 'origin/dev' into 27-transform-cascara-t…
odungern May 17, 2026
f625bd9
followed suggestions of Copilot when merging to branch 'dev'.
odungern May 17, 2026
c277078
Changed filename and function name from toHTML to getHTML
odungern May 17, 2026
fce14a9
Improve visual layout on page 'Interfaces'.
odungern May 18, 2026
f4ebb19
Change cache to store packages instead of HTML snippets. HTML convers…
odungern May 19, 2026
56ffcf6
Some refactoring.
odungern May 19, 2026
99eae1a
Merge pull request #98 from GfSE/27-transform-cascara-to-json-ld
csaenz-psg May 22, 2026
321fc3e
finished and tested export-jsonld
odungern May 23, 2026
10e2ae4
still v0.2.3: apply canonical order when exporting jsonld.
odungern May 23, 2026
27bea88
Merge branch 'dev' into 27-transform-cascara-to-json-ld
odungern May 23, 2026
12df456
docs: update JSON-LD README import to PackageCache
Copilot May 23, 2026
df3efd6
applied suggestion of Copilot on pull-request.
odungern May 23, 2026
8287ad6
solved a smaller merge conflict
odungern May 23, 2026
e461e5f
moved all transformations to JSON-LD from pig-metaclasses.ts to getJS…
odungern May 27, 2026
5f9e6c1
refactores the message codes and fixed a bug in getJSONLD.
odungern May 27, 2026
a216281
moved function sortJsonLdKeys from helpers to getJSONLD
odungern May 27, 2026
b1351c1
a little more refactoring
odungern May 27, 2026
0017ed5
improved HTML display and keyboard interaction.
odungern May 28, 2026
c4c4f63
fit app into the window to avoid a vertical slider for the whole window.
odungern May 28, 2026
f73b915
- improved ReqIF-to-CAS.xsl to extract the OBJECT-TYPES
odungern Jun 1, 2026
9258ab1
added two constraint checks
odungern Jun 1, 2026
5ae6fd1
Extended ReqIF import transformation to also extract SPEC-RELATIONS.
odungern Jun 1, 2026
a5a7299
- added extraction of SPECIFICATIOS to ReqIF-to-CAS.xsl
odungern Jun 2, 2026
4eca5e1
nothing spectacular: comments and landing-page refined
odungern Jun 5, 2026
2286d96
Merge pull request #100 from GfSE/27-transform-cascara-to-json-ld
csaenz-psg Jun 8, 2026
ba973fd
added initial xslt spec
Jun 10, 2026
5cc826f
added fmi-import
Jun 10, 2026
549f401
added helper to read blob
Jun 10, 2026
ff283db
copied pretty much the same as others for UI
Jun 10, 2026
1327a94
mounted plugin
Jun 10, 2026
ad640fe
added test data
Jun 10, 2026
efc7567
added fflate dependency to unpack fmu
Jun 10, 2026
cf57b40
fixed enums and units
Jun 10, 2026
f2c0a17
added transformation export and fixed test
Jun 10, 2026
e7825cd
added missing properties
Jun 10, 2026
bc7420e
updated tests
Jun 11, 2026
9a29a62
updated model dependencies, arrays
Jun 11, 2026
009bc78
updated tests
Jun 11, 2026
6bb4a4c
Merge pull request #102 from raks0009/dev
raks0009 Jun 11, 2026
1c95ca9
- changed name to CASCaRA Validation Tool
odungern Jun 12, 2026
2561aaf
3 minor changes in platform-independence.ts as suggested by GitHub Co…
odungern Jun 12, 2026
9e5d380
Merge pull request #104 from GfSE/94-transform-fmi-to-cascara
odungern Jun 12, 2026
29696ce
Merge branch 'main' into dev
odungern Jun 12, 2026
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
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CASCaDE-Reference-Implementation
# CASCaRA-Reference-Implementation

[CASCaRA](https://cascara.gfse.org) (formerly CASCaDE) is a project to standardize collaboration in systems engineering with respect to data format and ontology.
A [Request for Proposal (RFP)](https://www.omg.org/cgi-bin/doc?mantis/24-12-03.pdf) has been accepted by OMG in December 2024.
Expand All @@ -25,3 +25,24 @@ Major requirements (capabilities and characteristics) must be satisfied:
- Separate syntax and semantics: The software must not be changed, if the ontology is further developed.
- Comply with *web-technology* and avoid propriatory formats.
- Extend the software using a documented, if possible standardized plug-in mechanism.

Collaboration rules:
- This repository has two protected branches, namely 'main' and 'dev', where 'dev' is the default.
- The 'main' branch keeps just the released versions. In particular, it has a 'docs' folder which is published by GitHub pages.
- The 'dev' branch merges all development efforts, until a release is made. Then, a pull-request 'main'<--'dev' is initiated.
- All development tasks are planned in [GfSE/projects/5](https://github.com/orgs/GfSE/projects/5).
- When a task (an issue) is assigned and work is about to start, the task status is changed to 'in progress' and a new branch is opened
from within the task. The branch name will thus begin with the issue number.
- When the issue is done and all tests pass, a pull-request 'dev'<--'NN-issue-name' is initiated.
A number of rules apply. Among others, a review by GitHub Copilot is started automatically.
It is advised to respond to the suggestions and to follow them unless wrong. In addition, a team member shall be
asked to review the changes and to approve the pull-request.
- If all tasks/issues for a given release are closed and all tests pass, the release can be made and a merge with
'main' may be initiated as described above.
- Design documentation is done via Archi (Archimate Notation) in the '/design/' folder. An HTML is created using the
[SpecIF App](https://specif.de/apps/edit.html) and published on the
[CASCaRA Schema Server](https://product-information-graph.org/doc/reference-implementation/).
- Updates of the design documentation are equally merged with branch 'dev', first.

Note:
- Even though the project name has been changed to CASCaRA, the name of the repository is not changed to avoid a mess with cloned repositories.
233 changes: 233 additions & 0 deletions XSLT-IMPROVEMENT-SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
# ReqIF-to-CAS XSLT Improvement Summary

## Overview
The XSLT transformation `public/assets/xslt/ReqIF-to-CAS.xsl` has been improved to:
1. Collect and transform all ATTRIBUTE-DEFINITIONS into CAS Property objects
2. Collect and transform all SPEC-TYPEs (SPEC-OBJECT-TYPE, SPECIFICATION-TYPE, SPEC-RELATION-TYPE) into CAS Entity objects
3. Place all these elements in the graph alongside Entity instances (from SPEC-OBJECTs)
4. Normalize datetime values to ensure proper xs:dateTime format compliance

## Changes Made

### 1. Added New Namespace Declarations
- `xmlns:sh="http://www.w3.org/ns/shacl#"` - For SHACL datatype definitions
- `xmlns:xs="http://www.w3.org/2001/XMLSchema#"` - For XML Schema datatypes
- `xmlns:owl="http://www.w3.org/2002/07/owl#"` - For OWL ontology vocabulary

### 2. Added DateTime Normalization Helper
A helper template `normalizeDateTime` ensures all datetime values comply with xs:dateTime format:
- If datetime already has timezone information (contains `+`, `-`, or ends with `Z`), it's used as-is
- Otherwise, `Z` is appended to indicate UTC timezone
- This fixes schema validation errors for datetime values like `2024-04-08T10:18:03` → `2024-04-08T10:18:03Z`

### 3. Enhanced Root Template
Modified the `<graph>` section to collect:
- All ATTRIBUTE-DEFINITIONS from SPEC-OBJECT-TYPE, SPECIFICATION-TYPE, and SPEC-RELATION-TYPE (transformed to `cas:Property`)
- The TYPE definitions themselves: SPEC-OBJECT-TYPE, SPECIFICATION-TYPE, SPEC-RELATION-TYPE (transformed to `cas:Entity`)
- All SPEC-OBJECTs (transformed to `cas:anEntity`)

All elements are placed inside `<graph>` as siblings, creating a unified graph structure.

### 4. Created Templates for ATTRIBUTE-DEFINITIONS (7 templates)
Seven templates transform each ATTRIBUTE-DEFINITION type to `cas:Property`:

| ReqIF Type | Template | RDF Type | Output Datatype | Notes |
|------------|----------|----------|-----------------|-------|
| ATTRIBUTE-DEFINITION-STRING | ✓ | owl:DatatypeProperty | xs:string | Plain text |
| ATTRIBUTE-DEFINITION-XHTML | ✓ | owl:DatatypeProperty | xs:string | Formatted text |
| ATTRIBUTE-DEFINITION-INTEGER | ✓ | owl:DatatypeProperty | xs:integer | Integer numbers |
| ATTRIBUTE-DEFINITION-REAL | ✓ | owl:DatatypeProperty | xs:double | Floating-point numbers |
| ATTRIBUTE-DEFINITION-BOOLEAN | ✓ | owl:DatatypeProperty | xs:boolean | True/false values |
| ATTRIBUTE-DEFINITION-DATE | ✓ | owl:DatatypeProperty | xs:dateTime | Date and time |
| ATTRIBUTE-DEFINITION-ENUMERATION | ✓ | owl:DatatypeProperty | xs:string | Enumerated values |

### 5. Created Templates for SPEC-TYPEs (3 templates)
Three templates transform TYPE definitions:

| ReqIF Type | Template | Output Element | RDF Type | Template Mode | Notes |
|------------|----------|----------------|----------|---------------|-------|
| SPEC-OBJECT-TYPE | ✓ | cas:Entity | owl:Class | mode="entity" | Object type definitions |
| SPECIFICATION-TYPE | ✓ | cas:Entity | owl:Class | mode="entity" | Specification type definitions |
| SPEC-RELATION-TYPE | ✓ | cas:Relationship | owl:Class | mode="relationship" | Relation type definitions |

### 6. Property Structure
Each ATTRIBUTE-DEFINITION is transformed to a `<cas:Property>` element with:
- **id**: The IDENTIFIER from the ATTRIBUTE-DEFINITION
- **rdf:type**: "owl:DatatypeProperty"
- **dcterms:title**: The LONG-NAME from the ATTRIBUTE-DEFINITION
- **dcterms:description**: The DESC from the ATTRIBUTE-DEFINITION (if present)
- **dcterms:modified**: The LAST-CHANGE from the ATTRIBUTE-DEFINITION (if present, normalized to xs:dateTime format)
- **sh:datatype**: The appropriate XML Schema datatype

### 7. Entity Structure
SPEC-OBJECT-TYPE and SPECIFICATION-TYPE are transformed to `<cas:Entity>` elements with:
- **id**: The IDENTIFIER from the SPEC-TYPE
- **rdf:type**: "owl:Class"
- **dcterms:title**: The LONG-NAME from the SPEC-TYPE
- **dcterms:description**: The DESC from the SPEC-TYPE (if present)
- **dcterms:modified**: The LAST-CHANGE from the SPEC-TYPE (if present, normalized to xs:dateTime format)

### 8. Relationship Structure
SPEC-RELATION-TYPE is transformed to `<cas:Relationship>` elements with:
- **id**: The IDENTIFIER from the SPEC-RELATION-TYPE
- **rdf:type**: "owl:Class"
- **dcterms:title**: The LONG-NAME from the SPEC-RELATION-TYPE
- **dcterms:description**: The DESC from the SPEC-RELATION-TYPE (if present)
- **dcterms:modified**: The LAST-CHANGE from the SPEC-RELATION-TYPE (if present, normalized to xs:dateTime format)

### 9. Instance Structure
SPEC-OBJECT instances are transformed to `<cas:anEntity>` elements with:
- **id**: The IDENTIFIER from the SPEC-OBJECT
- **rdf:type**: The referenced SPEC-OBJECT-TYPE identifier (dynamic)
- **dcterms:title**: Extracted from ReqIF.Name or similar attributes
- **dcterms:description**: Extracted from ReqIF.Text or similar attributes
- **dcterms:modified**: The LAST-CHANGE from the SPEC-OBJECT (if present, normalized to xs:dateTime format)

## Example Transformation

### Input (ReqIF)
```xml
<SPEC-OBJECT-TYPE IDENTIFIER="RC-ResourceTerm"
LONG-NAME="Resource Term"
LAST-CHANGE="2020-03-01T07:59:00+01:00">
<SPEC-ATTRIBUTES>
<ATTRIBUTE-DEFINITION-STRING
IDENTIFIER="RC--116302417"
LONG-NAME="ReqIF.Name">
<TYPE>
<DATATYPE-DEFINITION-STRING-REF>DT-ShortString</DATATYPE-DEFINITION-STRING-REF>
</TYPE>
</ATTRIBUTE-DEFINITION-STRING>
</SPEC-ATTRIBUTES>
</SPEC-OBJECT-TYPE>

<SPEC-RELATION-TYPE IDENTIFIER="SC-isSpecialisationOf"
LONG-NAME="SysML:isSpecialisationOf"
DESC="Signifies that a term is a specialization of another"
LAST-CHANGE="2018-03-21T18:06:20+01:00">
<SPEC-ATTRIBUTES>
<ATTRIBUTE-DEFINITION-STRING
IDENTIFIER="RC--2128012875"
LONG-NAME="ReqIF.Name">
<TYPE>
<DATATYPE-DEFINITION-STRING-REF>DT-ShortString</DATATYPE-DEFINITION-STRING-REF>
</TYPE>
</ATTRIBUTE-DEFINITION-STRING>
</SPEC-ATTRIBUTES>
</SPEC-RELATION-TYPE>
```

### Output (CAS)
```xml
<cas:aPackage rdf:type="cas:Package" id="...">
<dcterms:title>...</dcterms:title>
<dcterms:description>...</dcterms:description>
<dcterms:modified>...</dcterms:modified>

<graph>
<!-- Properties from ATTRIBUTE-DEFINITIONS -->
<cas:Property rdf:type="owl:DatatypeProperty" id="RC--116302417">
<dcterms:title>ReqIF.Name</dcterms:title>
<sh:datatype>xs:string</sh:datatype>
</cas:Property>

<cas:Property rdf:type="owl:DatatypeProperty" id="RC--2128012875">
<dcterms:title>ReqIF.Name</dcterms:title>
<sh:datatype>xs:string</sh:datatype>
</cas:Property>

<!-- Entity Type from SPEC-OBJECT-TYPE -->
<cas:Entity rdf:type="owl:Class" id="RC-ResourceTerm">
<dcterms:title>Resource Term</dcterms:title>
<dcterms:modified>2020-03-01T07:59:00+01:00</dcterms:modified>
</cas:Entity>

<!-- Relationship Type from SPEC-RELATION-TYPE -->
<cas:Relationship rdf:type="owl:Class" id="SC-isSpecialisationOf">
<dcterms:title>SysML:isSpecialisationOf</dcterms:title>
<dcterms:description>Signifies that a term is a specialization of another</dcterms:description>
<dcterms:modified>2018-03-21T18:06:20+01:00</dcterms:modified>
</cas:Relationship>

<!-- Entity Instance from SPEC-OBJECT -->
<cas:anEntity rdf:type="RC-ResourceTerm" id="R-1234">
<dcterms:title>Lorry</dcterms:title>
<dcterms:description>Any of various conveyances...</dcterms:description>
<dcterms:modified>2020-03-01T07:59:00+01:00</dcterms:modified>
</cas:anEntity>
</graph>
</cas:aPackage>
```

## Testing

The transformation was validated against the following test files:
- `tests/data/ReqIF/Mars-Rover-Systems-extract.reqif` (STRING, XHTML types)
- `tests/data/ReqIF/Related-Terms.reqif` (STRING, XHTML with DESC)
- `tests/data/ReqIF/TC1000_E0000_S10_Reference_20120718_1511_jastram.reqif` (all 7 types)

### Validation Results
✓ All namespace declarations present
✓ All 7 ATTRIBUTE-DEFINITION templates created
✓ Properties collection from all 3 OBJECT-TYPE variants
✓ Correct datatype mappings for all types
✓ DESC attribute handling (optional field)
✓ SEF.JSON compilation successful (111.88 KB)

## Files Modified

1. **public/assets/xslt/ReqIF-to-CAS.xsl** - Main XSLT stylesheet
2. **public/assets/xslt/ReqIF-to-CAS.sef.json** - Compiled SEF.JSON (auto-generated)
3. **dist/assets/xslt/ReqIF-to-CAS.sef.json** - Distribution copy (will be updated on build)

## Technical Details

### XSLT Structure
- **Version**: XSLT 1.0
- **Total Templates**: 13
- 1 root template
- 7 ATTRIBUTE-DEFINITION templates (to cas:Property)
- 3 SPEC-TYPE templates (to cas:Entity) - using mode="entity"
- 1 SPEC-OBJECT template (to cas:anEntity)
- 1 helper template (getAttributeValue)

### Datatype Rationale
- **STRING/XHTML/ENUMERATION → xs:string**: All represent text data
- **INTEGER → xs:integer**: Whole numbers
- **REAL → xs:double**: Double-precision floating-point (more precision than xs:float)
- **BOOLEAN → xs:boolean**: True/false values
- **DATE → xs:dateTime**: Full date and time representation

### Compilation
The XSLT was successfully compiled to SEF.JSON using Saxon-JS:
```bash
node scripts/compile-xslt.js
```

## Usage

The improved XSLT is now ready to transform ReqIF files. The transformation will:
1. Extract all attribute metadata from ATTRIBUTE-DEFINITIONS
2. Convert them to CAS Property objects with appropriate datatypes
3. Extract SPEC-OBJECT-TYPE and SPECIFICATION-TYPE definitions
4. Convert them to CAS Entity objects (EntityType)
5. Extract SPEC-RELATION-TYPE definitions
6. Convert them to CAS Relationship objects (RelationshipType)
7. Extract all instances from SPEC-OBJECTs
8. Convert them to CAS anEntity objects (Requirement instances)
9. Place all elements (Properties, Entities, Relationships, Instances) inside the `<graph>` element as siblings
10. Preserve all original identifiers for referencing
11. Include human-readable titles and descriptions

## Benefits

- **Complete Metadata**: All attribute definitions captured in the graph as Properties
- **Type Definitions**: SPEC-OBJECT-TYPEs and SPECIFICATION-TYPEs captured as Entity objects
- **Relationship Definitions**: SPEC-RELATION-TYPEs captured as Relationship objects
- **Correct Type Mapping**: Different SPEC-TYPEs map to appropriate CAS elements
- **Unified Structure**: Properties, Entity Types, Relationship Types, and Entity Instances coexist in the same graph
- **Type Safety**: Proper datatype annotations enable validation
- **Traceability**: Original identifiers preserved for cross-referencing
- **Documentation**: Titles and descriptions provide context
- **Standards Compliance**: Uses standard vocabularies (dcterms, SHACL, XML Schema)
- **Complete Schema**: Both the schema (types) and data (instances) are represented
78 changes: 78 additions & 0 deletions demo-xslt-output.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/**
* Example output demonstration
* Shows what the improved XSLT produces
*/

console.log('=== ReqIF-to-CAS XSLT Transformation Example ===\n');

console.log('Given a ReqIF file with these ATTRIBUTE-DEFINITIONS:');
console.log('─────────────────────────────────────────────────\n');

const exampleDefinitions = [
{ type: 'STRING', id: 'RC--116302417', longName: 'ReqIF.Name', desc: '' },
{ type: 'XHTML', id: 'RC--1540583336', longName: 'ReqIF.Text', desc: '' },
{ type: 'INTEGER', id: 'ID_TC1000_Integer', longName: 'TC1000 Integer', desc: '' },
{ type: 'REAL', id: 'ID_TC1000_Real', longName: 'TC1000 Real', desc: '' },
{ type: 'BOOLEAN', id: 'ID_TC1000_Bool', longName: 'TC1000T', desc: '' },
{ type: 'DATE', id: 'ID_TC1000_Date', longName: 'TC1000 Date', desc: '' },
{ type: 'STRING', id: 'DT-ShortString', longName: 'String [256]', desc: 'String with length 256' }
];

exampleDefinitions.forEach((def, idx) => {
console.log(`${idx + 1}. ATTRIBUTE-DEFINITION-${def.type}`);
console.log(` IDENTIFIER="${def.id}"`);
console.log(` LONG-NAME="${def.longName}"`);
if (def.desc) {
console.log(` DESC="${def.desc}"`);
}
console.log('');
});

console.log('\n=== Transformed CAS Output ===\n');
console.log('─────────────────────────────────────────────────\n');

const datatypeMap = {
'STRING': 'xs:string',
'XHTML': 'xs:string',
'INTEGER': 'xs:integer',
'REAL': 'xs:double',
'BOOLEAN': 'xs:boolean',
'DATE': 'xs:dateTime',
'ENUMERATION': 'xs:string'
};

console.log('<cas:aPackage rdf:type="cas:Package" id="reqif-package">');
console.log(' <dcterms:title>TC 1000 Simple Content</dcterms:title>');
console.log(' <dcterms:description>ReqIF Document</dcterms:description>');
console.log(' <dcterms:modified>2012-07-18T15:11:33.670+02:00</dcterms:modified>');
console.log(' ');
console.log(' <graph>');

exampleDefinitions.forEach(def => {
console.log(` <cas:Property id="${def.id}">`);
console.log(` <dcterms:title>${def.longName}</dcterms:title>`);
if (def.desc) {
console.log(` <dcterms:description>${def.desc}</dcterms:description>`);
}
console.log(` <sh:datatype>${datatypeMap[def.type]}</sh:datatype>`);
console.log(` </cas:Property>`);
});

console.log(' ');
console.log(' <cas:anEntity rdf:type="IREB:Requirement" id="ID_TC1000_SpecObject">');
console.log(' <dcterms:title>Requirement Title</dcterms:title>');
console.log(' <dcterms:description>Requirement Description</dcterms:description>');
console.log(' <dcterms:modified>2012-04-07T01:51:37.112+02:00</dcterms:modified>');
console.log(' </cas:anEntity>');
console.log(' </graph>');
console.log('</cas:aPackage>');

console.log('\n─────────────────────────────────────────────────\n');
console.log('Key Features:');
console.log('✓ All ATTRIBUTE-DEFINITIONS collected in <properties> section');
console.log('✓ Each becomes a <cas:Property> with proper metadata');
console.log('✓ LONG-NAME → dcterms:title');
console.log('✓ DESC → dcterms:description (when present)');
console.log('✓ Type-specific datatypes (xs:string, xs:integer, etc.)');
console.log('✓ Original IDENTIFIERs preserved for referencing');
console.log('\n');
Loading
Loading