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.controller.md.sal.dom.store.impl.tree.spi;
10 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
11 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
12 import org.slf4j.Logger;
13 import org.slf4j.LoggerFactory;
15 import com.google.common.base.Optional;
17 final class ValueNode extends AbstractTreeNode {
18 private static final Logger LOG = LoggerFactory.getLogger(ValueNode.class);
20 protected ValueNode(final NormalizedNode<?, ?> data, final Version version) {
25 public Optional<TreeNode> getChild(final PathArgument childId) {
26 LOG.warn("Attempted to access child {} of value-node {}", childId, this);
27 return Optional.absent();
31 public Version getSubtreeVersion() {
36 public MutableTreeNode mutable() {
38 * Value nodes can only we read/written/delete, which does a straight
39 * replace. That means they don't haver need to be made mutable.
41 throw new UnsupportedOperationException(String.format("Attempted to mutate value-node %s", this));