public NodeState setParent(NodeState parent, String id) {
        this.parent = parent;
        this.id = id;
        return this;
    }
Sets the parent of this node.

@param parent The parent node.
@param id     The identifier of this node as seen in the parent.
@return This, to allow chaining.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/systemstate/rule/NodeState.java