X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=binding%2Fmdsal-binding-runtime-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fbinding%2Fruntime%2Fapi%2FChoiceRuntimeType.java;h=63fcb19bb32b8152b7f92896f9c8b2b034629d58;hb=0ee55d1f9da11dd03ff05fc67d10cbcbfe63fd2c;hp=9a2fa97b3b024bb3717dde2434bb07322f669c87;hpb=2037a8c6e17b521c9ccf1ee3a1a965fa96cade3d;p=mdsal.git diff --git a/binding/mdsal-binding-runtime-api/src/main/java/org/opendaylight/mdsal/binding/runtime/api/ChoiceRuntimeType.java b/binding/mdsal-binding-runtime-api/src/main/java/org/opendaylight/mdsal/binding/runtime/api/ChoiceRuntimeType.java index 9a2fa97b3b..63fcb19bb3 100644 --- a/binding/mdsal-binding-runtime-api/src/main/java/org/opendaylight/mdsal/binding/runtime/api/ChoiceRuntimeType.java +++ b/binding/mdsal-binding-runtime-api/src/main/java/org/opendaylight/mdsal/binding/runtime/api/ChoiceRuntimeType.java @@ -12,10 +12,12 @@ import java.util.Collection; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import org.opendaylight.mdsal.binding.model.api.JavaTypeName; +import org.opendaylight.yangtools.yang.binding.Augmentable; import org.opendaylight.yangtools.yang.model.api.stmt.ChoiceEffectiveStatement; /** - * A {@link RuntimeType} associated with a {@code choice} statement. + * A {@link RuntimeType} associated with a {@code choice} statement. Note that unlike YANG semantics, in Binding Spec + * semantics a type generated for a 'choice' statement is does not implement {@link Augmentable}. */ @Beta public interface ChoiceRuntimeType extends CompositeRuntimeType, DataRuntimeType { @@ -31,56 +33,10 @@ public interface ChoiceRuntimeType extends CompositeRuntimeType, DataRuntimeType */ @Nullable CaseRuntimeType bindingCaseChild(JavaTypeName typeName); - /** - * Return the runtime type for the original manifestation of this type's {@code choice} statement. - * Returns {@code null} if this type is the original. - * - * @return Original manifestatation, or {@code null} if this is the original manifestation. - */ - @Nullable ChoiceRuntimeType originalType(); - /** * Return all {@link CaseRuntimeType} valid at this type's statement. * * @return Valid {@link CaseRuntimeType}s */ @NonNull Collection validCaseChildren(); - - /** - * Return any additional {@link CaseRuntimeType}s which may be encountered when dealing with DataObjects supported - * by this type. These are not strictly valid in YANG view of modeled data, but may have potentially-equivalent - * representation, such as in the following case: - *
-     *   
-     *     grouping one {
-     *       container foo {
-     *         choice bar;
-     *       }
-     *     }
-     *
-     *     container foo {
-     *       uses grp;
-     *     }
-     *
-     *     container bar {
-     *       uses grp;
-     *     }
-     *
-     *     augment /foo/foo/bar {
-     *       case baz
-     *     }
-     *
-     *     augment /bar/foo/bar {
-     *       case xyzzy;
-     *     }
-     *   
-     * 
- * and, more notably, the two augments being in different modules. Since {@code choice bar}'s is part of a reusable - * construct, {@code grouping one}, DataObjects' copy builders can propagate them without translating them to the - * appropriate manifestation -- and they can do nothing about that as they lack the complete view of the effecitve - * model. - * - * @return Additional {@link CaseRuntimeType}s - */ - @NonNull Collection additionalCaseChildren(); }