Urgent.News

600+ sources. One page. See who else covered it.

Editions

Tech

Archi Semantic Core: Using Archi Models from TypeScript

How to read a .archimate file and work with its elements, relationships, and views from your own application. Archi stores its models in .archimate files. Although we normally interact with them through the editor, these files contain the complete model: elements, relationships, folders, views, diagram objects, connections, properties, geometry, and other data used by Archi. archi-semantic-core…

Archi Semantic Core enables working with Archi models from TypeScript. Models are stored in .archimate files, which contain elements, relationships, folders, views, diagram objects, connections, properties, geometry, and other data. The @cda/archi-semantic-core package provides access to this information in TypeScript without requiring understanding of how Archi structures its native XML internally.

Installation is done via npm: npm install @cda/archi-semantic-core. The primary operation is parseArchiModel, which takes XML text of a native Archi model and returns a typed ArchiModel.

With the model, you can access elements, relationships, and views. Elements are available through model.elements, and relationships through model.relationships. Your application can work directly with concepts from the Archi model instead of manually navigating XML nodes and namespaces. Elements include information such as name, type, and xsiType. Relationships contain type, sourceId, and targetId.

To extract XML from a .archimate file, use extractArchiModelXml to retrieve the XML from the file. The library separates responsibilities between extractArchiModelXml and parseArchiModel. Working with elements can be done using for loops or filtering techniques. Elements can be filtered based on their type, such as finding all ApplicationComponent elements.

Relationships can also be filtered and queried similarly to elements. With this library, you can easily open a model created in Archi and inspect its contents.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Every fusion startup that has raised over $100M

Fusion startups have raised $7.1 billion to date, with the majority of it going to a handful of companies.

  • Commonwealth Fusion Systems raised $1 billion in July, leading fusion sector.
  • Helion aims to generate electricity by 2028 with $3.2 billion in funding.
  • TAE Technologies secured $1.65 billion, merging with Trump Media.

More from Saturday 15 August →