2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.cluster.datastore.node.utils.transformer;
10 import static java.util.Objects.requireNonNull;
12 import org.eclipse.jdt.annotation.Nullable;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
15 import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeContainerBuilder;
16 import org.opendaylight.yangtools.yang.data.util.DataSchemaContextNode;
18 final class NormalizedNodeBuilderWrapper {
19 private final NormalizedNodeContainerBuilder<?, ?, ?, ?> builder;
20 private final PathArgument identifier;
21 private final DataSchemaContextNode<?> schemaNode;
23 NormalizedNodeBuilderWrapper(final NormalizedNodeContainerBuilder<?, ?, ?, ?> builder,
24 final PathArgument identifier, final @Nullable DataSchemaContextNode<?> schemaNode) {
25 this.builder = requireNonNull(builder);
26 this.identifier = requireNonNull(identifier);
27 this.schemaNode = schemaNode;
30 @SuppressWarnings("rawtypes")
31 NormalizedNodeContainerBuilder builder() {
36 return identifier.getNodeType();
39 PathArgument identifier() {
43 @Nullable DataSchemaContextNode<?> getSchema() {