BUG-865: remove ChoiceNode 55/26955/2
authorRobert Varga <rovarga@cisco.com>
Mon, 14 Sep 2015 15:08:03 +0000 (17:08 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 16 Sep 2015 14:19:15 +0000 (14:19 +0000)
ChoiceNode was deprecated in favor of ChoiceSchemaNode in Lithium.
Remove it.

Change-Id: I4acfdcbce5fdd99fb8a893fa5820623fcb527a3f
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/ChoiceNode.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ChoiceNode.java [deleted file]
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/DataSchemaNode.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/impl/ChoiceBuilder.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/impl/ChoiceSchemaNodeImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/impl/ChoiceNodeImpl.java with 92% similarity]

index d47320f59e7fd2760e32d7daa66ca48bb148812c..a073d1b6d110c25cbb9990ce2618365245164479 100644 (file)
@@ -18,11 +18,11 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgum
  * particular context of parent node.
  *
  * YANG Model and schema for choice is described by instance of
- * {@link org.opendaylight.yangtools.yang.model.api.ChoiceNode}.
+ * {@link org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode}.
  *
  * Valid alternatives of subtree are described by instances of
  * {@link org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode}, which are retrieved via
- * {@link org.opendaylight.yangtools.yang.model.api.ChoiceNode#getCases()}.
+ * {@link org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode#getCases()}.
  */
 public interface ChoiceNode extends //
         MixinNode, //
diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ChoiceNode.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ChoiceNode.java
deleted file mode 100644 (file)
index 3b39e9f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2013 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.yangtools.yang.model.api;
-
-
-/**
- * The ChoiceNode defines a set of alternatives. It consists of a number of
- * branches defined as ChoiceCaseNode objects.
- *
- * @deprecated This interface is deprecated in favor of {@link ChoiceSchemaNode} and
- *             will be removed in a future release.
- */
-@Deprecated
-public interface ChoiceNode extends ChoiceSchemaNode {
-
-}
index ab8ae21cafd9010502fd3496ff6e5bb4b5763152..146c4fc4f19d9a48fc0ee458f49665263040ab2e 100644 (file)
@@ -18,7 +18,7 @@ package org.opendaylight.yangtools.yang.model.api;
  * @see ContainerSchemaNode
  * @see ListSchemaNode
  * @see LeafListSchemaNode
- * @see ChoiceNode
+ * @see ChoiceSchemaNode
  * @see ChoiceCaseNode
  * @see LeafSchemaNode
  * @see AnyXmlSchemaNode
index 0b125f1f81de5411fdd1726dbb09f039c6e9f0c8..33d8f140b778dd0301e6cfdd34cf5e3ea5fd08b9 100644 (file)
@@ -33,7 +33,7 @@ import org.opendaylight.yangtools.yang.parser.util.YangParseException;
 
 public final class ChoiceBuilder extends AbstractSchemaNodeBuilder implements DataSchemaNodeBuilder,
 AugmentationTargetBuilder {
-    private ChoiceNodeImpl instance;
+    private ChoiceSchemaNodeImpl instance;
 
     // DataSchemaNode args
     private boolean augmenting;
@@ -88,7 +88,7 @@ AugmentationTargetBuilder {
             return instance;
         }
 
-        instance = new ChoiceNodeImpl(qname, schemaPath);
+        instance = new ChoiceSchemaNodeImpl(qname, schemaPath);
 
         instance.description = description;
         instance.reference = reference;
similarity index 92%
rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/impl/ChoiceNodeImpl.java
rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/impl/ChoiceSchemaNodeImpl.java
index 20bb0a6b35c934d74f42eea450edac31a2ef6dd4..5c4d74020dc410072688a08011593deb07d81310 100644 (file)
@@ -16,7 +16,6 @@ import java.util.Set;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
 import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode;
-import org.opendaylight.yangtools.yang.model.api.ChoiceNode;
 import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ConstraintDefinition;
 import org.opendaylight.yangtools.yang.model.api.DerivableSchemaNode;
@@ -24,8 +23,7 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 import org.opendaylight.yangtools.yang.model.api.Status;
 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 
-// FIXME: BUG-1513: remove ChoiceNode in Beryllium timeframe
-final class ChoiceNodeImpl implements ChoiceNode, ChoiceSchemaNode, DerivableSchemaNode {
+final class ChoiceSchemaNodeImpl implements ChoiceSchemaNode, DerivableSchemaNode {
     private final QName qname;
     private final SchemaPath path;
     String description;
@@ -41,7 +39,7 @@ final class ChoiceNodeImpl implements ChoiceNode, ChoiceSchemaNode, DerivableSch
     ImmutableList<UnknownSchemaNode> unknownNodes;
     String defaultCase;
 
-    ChoiceNodeImpl(final QName qname, final SchemaPath path) {
+    ChoiceSchemaNodeImpl(final QName qname, final SchemaPath path) {
         this.qname = qname;
         this.path = path;
     }
@@ -163,7 +161,7 @@ final class ChoiceNodeImpl implements ChoiceNode, ChoiceSchemaNode, DerivableSch
         if (getClass() != obj.getClass()) {
             return false;
         }
-        ChoiceNodeImpl other = (ChoiceNodeImpl) obj;
+        ChoiceSchemaNodeImpl other = (ChoiceSchemaNodeImpl) obj;
         if (qname == null) {
             if (other.qname != null) {
                 return false;
@@ -183,7 +181,7 @@ final class ChoiceNodeImpl implements ChoiceNode, ChoiceSchemaNode, DerivableSch
 
     @Override
     public String toString() {
-        StringBuilder sb = new StringBuilder(ChoiceNodeImpl.class.getSimpleName());
+        StringBuilder sb = new StringBuilder(ChoiceSchemaNodeImpl.class.getSimpleName());
         sb.append("[");
         sb.append("qname=").append(qname);
         sb.append("]");