This repository contains open-source software that can be used to transform data models, modelled as UML diagrams in Enterprise Architect, into various artefacts such as an HTML page, JSON-LD context file or an RDF file. These components were built to support the Flemish Interoperability Program, called Open Standards for Linked Organizations (OSLO), which is reponsible for the creation of data standards in Flanders, based on the principles of Linked Data.
This repository is managed as a monorepo, using Lerna. Each package in this repository acts as a stand-alone component that can be executed via the CLI and has its own version management. The following components are available:
oslo-converter-stakeholders
transforms an OSLO stakeholders csv file into JSON-LDoslo-converter-uml-ea
converts an Enterprise Architect file into JSON-LD, called OSLO JSON-LD, which is used as input for the generatorsoslo-core
contains the core interfaces, utility functions, loggers, etc... that can be used in the other packagesoslo-extractor-uml-ea
reads the Enterprise Architect file and maps the data to typesoslo-generator-jsonld-context
generates a JSON-LD context file using an OSLO JSON-LD as inputoslo-generator-rdf-vocabulary
generates an RDF file using an OSLO JSON-LD as inputoslo-generator-respec-html
generates an HTML page using the ReSpec template using an OSLO JSON-LD as inputoslo-generator-json-webuniversum
generates a Webuniversum config file that can be used in the Nuxt projects using an OSLO JSON-LD as inputoslo-generator-html
generates an HTML page using the Nunjucks template using an OSLO JSON-LD as inputoslo-examples-generator
generate examples based on an OSLO JSON-LD file
The packages oslo-core
and oslo-extractor-uml-ea
are not executable via the CLI, as their purpose is to be added as a depedency in other packages.
Each package package is published on the NPM registry and can be installed globally or as part of a NodeJS project. The README.md of each package describes how the component can be executed along with the various CLI options.
To build the source code, the dependencies must first be installed. We make use op npm workspaces, so the dependencies of all packages are installed as well. More information on workspaces can be found here.
npm install
Finally, the source code can be built:
npm run build
Each package has a number of unit tests that can be executed with the following command:
npm run test:unit
Running this command in the root folder will execute the unit test command for each package, while running it in a package folder will only trigger the unit tests of the particular package.
On every push or pull request on the main branch, the unit tests are run automatically via Github Actions. Next to the unit tests, we are working on integration tests, that will also be run on every push or pull request.
Note: Due to the different (large) input files, the integration tests will not be part of the package and will only be performed via GitHub Actions.
This code is copyrighted by Digitaal Vlaanderen and released under the MIT license