/** One named element in a serialized library, with its containment path. */ export interface XmiElement { /** Dot-joined declared names from the root down, e.g. `Parts::Part`. */ qualifiedName: string; /** Local declared name. */ name: string; /** Metaclass, with the `sysml:` prefix stripped — `PartUsage`, `DataType`. */ metatype: string; /** The Pilot's own element UUID. */ elementId?: string; /** * True where the serialization marks the element as added by implication * rather than declared in the source. This is the one attribute that makes * `xmi.implied` a differential oracle rather than a second copy. */ implied: boolean; /** Nesting depth, root elements at 0. */ depth: number; } export interface XmiDocument { path: string; /** Named elements, in document order. */ elements: XmiElement[]; /** Named elements by qualified name; later duplicates are kept in `elements`. */ byQualifiedName: Map; /** Elements the file contains that carry no declared name. */ anonymousCount: number; } export declare class XmiParseError extends Error { constructor(path: string, offset: number, detail: string); } export declare function decodeEntities(raw: string): string; /** `sysml:LibraryPackage` → `LibraryPackage`; a bare name is returned as-is. */ export declare function localName(qualified: string | undefined): string | undefined; /** * Read one XMI file into its named elements. * * Only elements carrying `declaredName` become entries. Everything else — * memberships, documentation bodies, feature chains — is containment structure * whose identity is a UUID, and comparing UUIDs across two independent * implementations compares nothing. What both sides can be held to is *which * named elements exist, of what metaclass, under what qualified name*. */ export declare function readXmi(path: string): XmiDocument; //# sourceMappingURL=xmi.d.ts.map