-
Notifications
You must be signed in to change notification settings - Fork 3
Home
uml4net is a .NET implementation of the OMG UML specification. It is typically used to read a UML model from a canonical XMI file and generate code on the basis of its content. A large part of the classes contained in the various projects are code generated using uml4net itself by parsing the Normative Machine Readable Documents provided with the spec:
| Description | URL |
|---|---|
| UML 2.5.1 Abstract Syntax Metamodel | UML/20161101/UML.xmi |
| UML 2.5.1 Primitive Types | UML/20161101/PrimitiveTypes.xmi |
| UML 2.5.1 Standard Profile | UML/20161101/StandardProfile.xmi |
| UML 2.5.1 Diagram Interchange Metamodel | UML/20161101/UMLDI.xmi |
The uml4net solution contains the following libraries/packages:
-
uml4net: The core library/project that contains all the class definitions as they appear in the UML 2.5.1 specification. -
uml4net.Extensions: A library/project that provides extension methods for the uml4net library/project. -
uml4net.xmi: A typed XMI reader library/project to read a canonical XMI file that contains a UML model. -
uml4net.HandleBars: A library/project that provides HandleBars helpers to support code generation. -
uml4net.Reporting: A library/project that provides a number of report generators (html, xlsx, text) that generate documentation on the basis of the loaded UML model. -
uml4net.Tools: A commandline application that is used to generate reports on the contents of a UML model. Find the documentation here.
Reading a UML model is straightforward and is done using the an IXmiReader. An instance of IXmiReader is created using the XmiReaderBuilder. Once the reader is available, point it to a UML model you want to read and you're of to the races:
var reader = XmiReaderBuilder.Create()
.Build();
var xmiReaderResult = reader.Read("path-to-your-model");
var rootPackage = xmiReaderResult.QueryRoot("<xmi:id-of-the-root-package-you-are-interested-in>");
The IXmiReader can be configured with the IXmiReaderSettings interface, read more about reading an XMI document here
With Uml4Net it is also possible to process StereoTypes that have been applied to UML elements. Read more about that here.
The package are available on Nuget at:
GitHub actions are used to build and test the uml4net libraries
| Branch | Build Status |
|---|---|
| Master | |
| Development |
The Object Management Group (OMG) is an international technology standards consortium. It was founded in 1989 with the goal of creating and maintaining vendor-neutral, interoperable, and portable standards for distributed computing. UML is one of the standards provided by OMG at http://www.omg.org/spec/UML/
The uml4net libraries are provided to the community under the Apache License 2.0.
Contributions to the code-base are welcome. However, before we can accept your contributions we ask any contributor to sign the Contributor License Agreement (CLA) and send this digitaly signed to s.gerene@stariongroup.eu. You can find the CLA's in the CLA folder.
copyright @ Starion Group S.A.
- Home
- uml4net Tools
- Code Generation Tutorial
- Primitive Types Mapping
- Profiles and StereoTypes
- Code Generation Conventions
- UML Handlerbars Helpers
- Developers Experience
- SBOM