X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=binding%2Fmdsal-binding-dom-adapter%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fbinding%2Fdom%2Fadapter%2FBindingStructuralType.java;h=7fabbeab785d6f752c2ff3419bd13c5534b52ec2;hb=11408d627adca7eb71ac956c3ad01f75b6b91596;hp=5a7c70e3a5bf63ad9f38ea557fb369c126670a6f;hpb=8d19626640b8f6cab9ed3e0f9908fa3c416956e5;p=mdsal.git diff --git a/binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/BindingStructuralType.java b/binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/BindingStructuralType.java index 5a7c70e3a5..7fabbeab78 100644 --- a/binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/BindingStructuralType.java +++ b/binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/BindingStructuralType.java @@ -7,12 +7,13 @@ */ package org.opendaylight.mdsal.binding.dom.adapter; +import com.google.common.annotations.Beta; import java.util.Optional; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument; -import org.opendaylight.yangtools.yang.data.api.schema.AnyXmlNode; +import org.opendaylight.yangtools.yang.data.api.schema.AnyxmlNode; import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode; import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; @@ -22,72 +23,54 @@ import org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode; import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; import org.opendaylight.yangtools.yang.data.api.schema.MapNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode; +import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListEntryNode; +import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListNode; +import org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode; /** - * Defines structural mapping of Normalized Node to Binding data - * addressable by Instance Identifier. + * Defines structural mapping of Normalized Node to Binding data addressable by Instance Identifier. Not all binding + * data are addressable by instance identifier and there are some differences. * *
- * Not all binding data are addressable by instance identifier - * and there are some differences. + * See {@link #NOT_ADDRESSABLE},{@link #INVISIBLE_CONTAINER},{@link #VISIBLE_CONTAINER} for more details. * *
- * See {@link #NOT_ADDRESSABLE},{@link #INVISIBLE_CONTAINER},{@link #VISIBLE_CONTAINER} - * for more details. + * NOTE: this class is exposed for migration purposes only, no new users outside of its package should be introduced. */ -enum BindingStructuralType { - +@Beta +public enum BindingStructuralType { /** - * DOM Item is not addressable in Binding Instance Identifier, - * data is not lost, but are available only via parent object. - * - *
- * Such types of data are leaf-lists, leafs, list without keys - * or anyxml. - * + * DOM Item is not addressable in Binding InstanceIdentifier, data is not lost, but are available only via parent + * object. Such types of data are leaf-lists, leafs, list without keys or anyxml. */ NOT_ADDRESSABLE, /** - * Data container is addressable in NormalizedNode format, - * but in Binding it is not represented in Instance Identifier. + * Data container is addressable in NormalizedNode format, but in Binding it is not represented in + * InstanceIdentifier. These are choice / case nodes. * *
- * This are choice / case nodes. - * - *
- * This data is still accessible using parent object and their - * children are addressable. - * + * This data is still accessible using parent object and their children are addressable. */ INVISIBLE_CONTAINER, /** - * Data container is addressable in NormalizedNode format, - * but in Binding it is not represented in Instance Identifier. - * - *
- * This are list nodes. + * Data container is addressable in NormalizedNode format, but in Binding it is not represented in + * InstanceIdentifier. These are list nodes. * *
- * This data is still accessible using parent object and their
- * children are addressable.
- *
+ * This data is still accessible using parent object and their children are addressable.
*/
INVISIBLE_LIST,
/**
- * Data container is addressable in Binding Instance Identifier format
- * and also YangInstanceIdentifier format.
- *
+ * Data container is addressable in Binding InstanceIdentifier format and also YangInstanceIdentifier format.
*/
VISIBLE_CONTAINER,
/**
- * Mapping algorithm was unable to detect type or was not updated after introduction
- * of new NormalizedNode type.
+ * Mapping algorithm was unable to detect type or was not updated after introduction of new NormalizedNode type.
*/
UNKNOWN;
- static BindingStructuralType from(final DataTreeCandidateNode domChildNode) {
- Optional