2 * Copyright (c) 2014 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.yangtools.binding.data.codec.impl;
10 import java.util.List;
11 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
13 import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode;
15 class CaseNodeCodecContext extends DataObjectCodecContext<ChoiceCaseNode> {
17 private final YangInstanceIdentifier.PathArgument yangIdentifier;
19 CaseNodeCodecContext(final Class<?> cls, final ChoiceCaseNode nodeSchema,
20 final CodecContextFactory runtimeContext) {
21 super(cls, nodeSchema.getQName().getModule(), nodeSchema, runtimeContext);
22 this.yangIdentifier = (new YangInstanceIdentifier.NodeIdentifier(nodeSchema.getQName()));
26 protected YangInstanceIdentifier.PathArgument getDomPathArgument() {
27 return yangIdentifier;
31 protected void addYangPathArgument(final PathArgument arg,
32 final List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> builder) {