@Override public NormalizedNodeContainerBuilder<NodeIdentifier, PathArgument, LeafSetEntryNode<T>, LeafSetNode<T>> addChild( final LeafSetEntryNode<T> child) { return withChild(child); }
@Override public ListNodeBuilder<T, LeafSetEntryNode<T>> withValue(final Collection<LeafSetEntryNode<T>> withValue) { for (final LeafSetEntryNode<T> leafSetEntry : withValue) { withChild(leafSetEntry); } return this; }
@Override public NormalizedNodeContainerBuilder<NodeIdentifier, PathArgument, LeafSetEntryNode<T>, LeafSetNode<T>> addChild( final LeafSetEntryNode<T> child) { return withChild(child); }
@Override public ListNodeBuilder<T, LeafSetEntryNode<T>> withValue(final Collection<LeafSetEntryNode<T>> withValue) { for (final LeafSetEntryNode<T> leafSetEntry : withValue) { withChild(leafSetEntry); } return this; }
@Override public ListNodeBuilder<T, LeafSetEntryNode<T>> withChild(final LeafSetEntryNode<T> child) { return super.withChild(interner.intern(child)); } }
@Override public ListNodeBuilder<T, LeafSetEntryNode<T>> withChild(final LeafSetEntryNode<T> child) { return super.withChild(interner.intern(child)); } }
@Override public ListNodeBuilder<T, LeafSetEntryNode<T>> withChild(final LeafSetEntryNode<T> child) { checkArgument(schema.getQName().equals(child.getNodeType()), "Incompatible node type, should be: %s, is: %s", schema.getQName(), child.getNodeType()); // TODO check value type using TypeProvider ? DataValidationException.checkLegalChild(schema.getQName().equals(child.getNodeType()), child.getIdentifier(), schema, Collections.singleton(schema.getQName())); return super.withChild(child); }
@Override public ListNodeBuilder<T, LeafSetEntryNode<T>> withChild(final LeafSetEntryNode<T> child) { checkArgument(schema.getQName().equals(child.getNodeType()), "Incompatible node type, should be: %s, is: %s", schema.getQName(), child.getNodeType()); // TODO check value type using TypeProvider ? DataValidationException.checkLegalChild(schema.getQName().equals(child.getNodeType()), child.getIdentifier(), schema, Collections.singleton(schema.getQName())); return super.withChild(child); }
@Override public ListNodeBuilder<T, LeafSetEntryNode<T>> withChildValue(final T childValue, final Map<QName, String> attributes) { final ImmutableLeafSetEntryNodeBuilder<T> b = ImmutableLeafSetEntryNodeBuilder.create(); b.withNodeIdentifier(new NodeWithValue<>(nodeIdentifier.getNodeType(), childValue)); b.withValue(childValue); b.withAttributes(attributes); return withChild(b.build()); }
@Override public ListNodeBuilder<T, LeafSetEntryNode<T>> withChildValue(final T childValue, final Map<QName, String> attributes) { final ImmutableLeafSetEntryNodeBuilder<T> b = ImmutableLeafSetEntryNodeBuilder.create(); b.withNodeIdentifier(new NodeWithValue<>(nodeIdentifier.getNodeType(), childValue)); b.withValue(childValue); b.withAttributes(attributes); return withChild(b.build()); }