X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2FEmptyNodeWrapper.java;h=934d4434c38a3e724279405da05198099eba2f70;hp=c601414a61ca2dea3d2f897db287c272b7db81a1;hb=0a2c659c014737c7e12a39001310de14d5f85149;hpb=702ba6faa3f7f2f6bd8ae02b3bc1abc06aea1c26 diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/EmptyNodeWrapper.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/EmptyNodeWrapper.java index c601414a61..934d4434c3 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/EmptyNodeWrapper.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/EmptyNodeWrapper.java @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.restconf.impl; import java.net.URI; @@ -11,9 +18,9 @@ import org.opendaylight.yangtools.yang.data.impl.NodeFactory; import com.google.common.base.Preconditions; public final class EmptyNodeWrapper implements NodeWrapper>, Node { - + private Node unwrapped; - + private String localName; private URI namespace; private QName name; @@ -23,27 +30,27 @@ public final class EmptyNodeWrapper implements NodeWrapper>, Node public boolean isComposite() { return composite; } - + public void setComposite(boolean composite) { this.composite = composite; } - + public EmptyNodeWrapper(URI namespace, String localName) { this.localName = Preconditions.checkNotNull(localName); this.namespace = namespace; } - + @Override public void setQname(QName name) { Preconditions.checkState(unwrapped == null, "Cannot change the object, due to data inconsistencies."); this.name = name; } - + @Override public QName getQname() { return name; } - + @Override public String getLocalName() { if (unwrapped != null) { @@ -51,7 +58,7 @@ public final class EmptyNodeWrapper implements NodeWrapper>, Node } return localName; } - + @Override public URI getNamespace() { if (unwrapped != null) {