createFromJSON(json: NodeJSON, registryParam?: Registry, lane: ModelLane): T | null | Deserialize a single NodeJSON (operation | container form) into the appropriate typed node instance, or null if unrecognized. lane = which model section the node sits in — value methods build ParameterNode/AssetNode (header), entity methods build OperationNode. |
rootNodes(): NodeCollection | The model's ROOT node collection. Keys are referenced from expressions model-wide, so key generation/rename checks must see EVERY node — not just this subtree (a container's child colliding with a root node would make the reference ambiguous). Falls back to this collection when detached. |
keyExists(key: string, except?: BaseNode): boolean | True when key is used by any node in the model other than except. |
renameReferences(oldKey: string, newKey: string): void | Rewrite every expression in the model that references oldKey as an identifier to newKey — called after a successful setKey() so a rename doesn't silently break every formula that referenced the old name. Each rewritten node's setInput() cascades its own dirty flag; this re-evaluates once at the end (a single batch, not one pull per rewritten expression). |
addOperation(method: string, argsMap: Record<string, string>, key?: string): OperationNode | Create and add an entity operation bound to the given registry method. Auto-assigns a model-wide-unique key from the registry's defaultKey ("array1", "fillet2", …) so the result is referenceable immediately. |
addContainer(key?: string): ContainerNode | Create and add an empty container; returns the new node. |
addAsset(method: "createMaterial" | "createLayer"): AssetNode | Create and add a material/layer resource declaration (AssetNode); returns the new node. |
traverse(fn: (node: BaseNode) => void): void | Walk every node in the collection (including nested children) and call fn on each. |