XMI import
bluep imports a conservative subset of XMI 2.x UML class models. The importer does not access networks or follow external references, URLs, entities or schemas.
Supported standard scope
The namespace-aware XML reader accepts a UTF-8 XMI document with a root namespace ending in /XMI and version 2.x. It understands packagedElement, ownedMember, direct Class and Association objects, owned UML attributes, primitive types, binary association ends, multiplicity and generalization. Namespace prefixes can differ.
XML safety
The parser caps input at 16 MiB, element nesting at 256, attributes per element at 4096 and events at 2 million. DTDs, DOCTYPE, external and internal entity declarations are rejected; the only decoded entities are XML built-ins and valid decimal/hex Unicode character references. It normalizes CRLF and CR for positioned errors. It never loads external content.
Type mapping
| UML | Logical type |
|---|---|
| Boolean | boolean |
| Byte, Short, Integer | integer |
| Long | bigint |
| Float | float |
| Double, Real | double |
| Decimal | decimal(38,18) |
| String, UnlimitedNatural | text |
| Date, Time, DateTime | date, time, timestamp |
| Binary | binary |
Unknown primitives are mapped to text with an explicit notice. Identifiers are made legal by replacing invalid runs with underscores; colliding names receive numbered suffixes.
Entities, keys, associations and generalization
Each class becomes an entity; ordinary owned attributes become attributes, and isID=true members become its primary key. Without an explicit UML id, a non-null attribute named id is used as the key. Multiplicity lower 0 makes an attribute nullable.
Binary associations become one-to-one, one-to-many or many-to-many logical relationships. Foreign key attributes are created on the child from the parent key, using the role name and avoiding collisions. Inheritance becomes a complete/inclusive hierarchy with imported supertypes and subtypes. A class with multiple supertypes is rejected. Unrepresentable packaged elements and non-binary associations produce notices rather than silently changing model semantics.
CLI
bluep import xmi devdata/xmi/shop.xmi --out /tmp/shop --name shop
bluep check /tmp/shop
Pass --area Imported to group imported entities or --report notices.json for a canonical notice report. Input - reads standard input; --force explicitly overwrites an existing model. Every imported model is validated before writing. The implementation does not import UML diagrams, arbitrary profiles, behavior or layout, and has no XMI export.