- final var context = schemaHandler.get();
- final Optional<Module> module = context.findModule(NOTIFI_QNAME.getModule());
- checkState(module.isPresent());
- final DataSchemaNode notify = module.get().dataChildByName(NOTIFI_QNAME);
- checkState(notify instanceof ContainerSchemaNode, "Unexpected non-container %s", notify);
- final DataSchemaNode location = ((ContainerSchemaNode) notify).getDataChildByName(LOCATION_QNAME);
-
- return InstanceIdentifierContext.ofDataSchemaNode(context, location);
+ return InstanceIdentifierContext.ofStack(
+ SchemaInferenceStack.ofDataTreePath(schemaHandler.get(), NOTIFI_QNAME, LOCATION_QNAME));