1616
1717## Introduction
1818
19- The main purpose of this package it to allow users to load and parse one or
20- more [ .ttl files ] ( < https://en.wikipedia .org/wiki/Turtle_(syntax) > ) into native TypeScript objects .
19+ This project enables developers to effortlessly load and parse one or more [ .ttl files ] ( < https://en.wikipedia.org/wiki/Turtle_(syntax) > )
20+ and instantiate native TypeScript objects of the pared [ SAMM ] ( < https://projects.eclipse .org/projects/dt.esmf > ) semantic concepts .
2121
2222## Getting help
2323
@@ -39,7 +39,7 @@ npm install @esmf/aspect-model-loader
3939
4040## Usage
4141
42- This package contains two methods for loading ttl files(string value of the .ttl files).
42+ Instantiating an Aspect the following two methods for loading ttl files(string value of the .ttl files) are provided .
4343
4444Load an aspect model which is self-contained (includes no imports to other ttl file):
4545
@@ -49,16 +49,27 @@ new AspectModelLoader().loadSelfContainedModel(ttl).subscribe((aspect: Aspect) =
4949});
5050```
5151
52- or if the model contains imports to additional ttl files:
52+ or if the model contains imports to further ttl files:
5353
5454```
55- new AspectModelLoader().load('<aspect-model-urn>', ttl-1, ttl-2, ttl-3).subscribe((aspect: Aspect) => {
55+ new AspectModelLoader().load('<aspect-model-urn>', ttl-1, ttl-2, ttl-3, ...).subscribe((aspect: Aspect) => {
56+ ...
57+ });
58+ ```
59+
60+ Besides loading an aspect the project also supports to load and group the SAMM definitions by namespace.
61+
62+ Load all namespace and related SAMM semantic concepts:
63+
64+ ```
65+ new NamespaceLoader().load(ttl-1, ttl-2, ttl-3, ...).subscribe((namespaces: Observable<Map<string, Array<BaseMetaModelElement>>>) => {
5666...
5767});
5868```
5969
6070If you are using external .ttl files you may need to parse the contents of these files to strings, to be passed to the
61- methods params.
71+ methods params. Further all .ttl files must use the same SAMM version. Loading SAMM semantic concepts from different .ttl files
72+ having different SAMM versions is not supported yet.
6273
6374## Helpful functions
6475
0 commit comments