- private CompositeNode toStreamCompositeNode(final String streamName, final DataSchemaNode streamSchemaNode) {
- final List<Node<?>> streamNodeValues = new ArrayList<Node<?>>();
- List<DataSchemaNode> instanceDataChildrenByName =
- this.controllerContext.findInstanceDataChildrenByName(((DataNodeContainer) streamSchemaNode),
- "name");
- final DataSchemaNode nameSchemaNode = Iterables.getFirst(instanceDataChildrenByName, null);
- streamNodeValues.add(NodeFactory.<String>createImmutableSimpleNode(nameSchemaNode.getQName(), null,
- streamName));
-
- instanceDataChildrenByName = this.controllerContext.findInstanceDataChildrenByName(
- ((DataNodeContainer) streamSchemaNode), "description");
- final DataSchemaNode descriptionSchemaNode = Iterables.getFirst(instanceDataChildrenByName, null);
- streamNodeValues.add(NodeFactory.<String>createImmutableSimpleNode(descriptionSchemaNode.getQName(), null,
- "DESCRIPTION_PLACEHOLDER"));
-
- instanceDataChildrenByName = this.controllerContext.findInstanceDataChildrenByName(
- ((DataNodeContainer) streamSchemaNode), "replay-support");
- final DataSchemaNode replaySupportSchemaNode = Iterables.getFirst(instanceDataChildrenByName, null);
- streamNodeValues.add(NodeFactory.<Boolean>createImmutableSimpleNode(replaySupportSchemaNode.getQName(), null,
- Boolean.valueOf(true)));
-
- instanceDataChildrenByName = this.controllerContext.findInstanceDataChildrenByName(
- ((DataNodeContainer) streamSchemaNode), "replay-log-creation-time");
- final DataSchemaNode replayLogCreationTimeSchemaNode = Iterables.getFirst(instanceDataChildrenByName, null);
- streamNodeValues.add(NodeFactory.<String>createImmutableSimpleNode(replayLogCreationTimeSchemaNode.getQName(),
- null, ""));
-
- instanceDataChildrenByName = this.controllerContext.findInstanceDataChildrenByName(
- ((DataNodeContainer) streamSchemaNode), "events");
- final DataSchemaNode eventsSchemaNode = Iterables.getFirst(instanceDataChildrenByName, null);
- streamNodeValues.add(NodeFactory.<String>createImmutableSimpleNode(eventsSchemaNode.getQName(),
- null, ""));
-
- return NodeFactory.createImmutableCompositeNode(streamSchemaNode.getQName(), null, streamNodeValues);