Rename NormalizedTree to NormalizedTuple 20/106020/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 18 May 2023 06:35:25 +0000 (08:35 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 18 May 2023 06:36:55 +0000 (08:36 +0200)
'NormalizedTree' has more implications than we would like. Also the
layout lends itself of any level of indirection, so let's just call it a
NormalizedTuple.

JIRA: YANGTOOLS-1172
Change-Id: I6680154ace0d8d56fc5bcd2368405e20792bf8dd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/NormalizedMountPoint.java
data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/NormalizedTuple.java [moved from data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/NormalizedTree.java with 90% similarity]
data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/stream/NormalizationResult.java

index 5b630e6cd10acbcd7d062224baa779c753271370..a2a757d2fb4ab2e97bf3276cc8760060519cf111 100644 (file)
@@ -11,11 +11,11 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.opendaylight.yangtools.rfc8528.model.api.MountPointLabel;
 
 /**
- * Normalized representation of a YANG mount point. This is a {@link NormalizedTree}, with a {@link #label()} and the
+ * Normalized representation of a YANG mount point. This is a {@link NormalizedTuple}, with a {@link #label()} and the
  * corresponding {@link #context()}. Furthermore {@link #data()} is guaranteed to point at a {@link ContainerNode}.
  */
 @NonNullByDefault
-public interface NormalizedMountPoint extends NormalizedTree {
+public interface NormalizedMountPoint extends NormalizedTuple {
     /**
      * Return the {@code mount-point} label.
      *
similarity index 90%
rename from data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/NormalizedTree.java
rename to data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/NormalizedTuple.java
index 8e86bf6e79ffaa66ea657b5ac974aa2b9f2ad8c6..3d1c96339f7edd1658ff223c1cdfa793a0f967b2 100644 (file)
@@ -13,7 +13,7 @@ import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.yangtools.concepts.Immutable;
 
 /**
- * A tree of normalized {@link #data()}, with corresponding {@link #metadata()} and {@link #mountPoints()}. The three
+ * A tuple of normalized {@link #data()}, with corresponding {@link #metadata()} and {@link #mountPoints()}. The three
  * views are expected to be consistent in their addressing -- i.e. when traversing {@link #data()} tree,
  * the corresponding metadata should be available through {@link NormalizedMetadata#getChildren()} and mount point
  * attachments should be available through {@link NormalizedMountpoints#getChildren()}.
@@ -22,7 +22,7 @@ import org.opendaylight.yangtools.concepts.Immutable;
 //        the corresponding metadata and/or mount points. Most notably mount points are only defined for ContainerNode
 //        and MapEntryNode.
 @Beta
-public interface NormalizedTree extends Immutable {
+public interface NormalizedTuple extends Immutable {
     /**
      * Return the data portion of this tree.
      *
index 2c74140a1613ac831eede20dfc09d69d2df3e745..78a760c1cd145b5f934b5524d208f3c3f2de7b47 100644 (file)
@@ -14,16 +14,16 @@ import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedMetadata;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedMountpoints;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
-import org.opendaylight.yangtools.yang.data.api.schema.NormalizedTree;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedTuple;
 
 /**
  * The result of a {@link NormalizedNodeStreamWriter} stream, i.e. of a normalization operation. It really is just an
- * implementation of {@link NormalizedTree}.
+ * implementation of {@link NormalizedTuple}.
  */
 public record NormalizationResult(
         @NonNull NormalizedNode data,
         @Nullable NormalizedMetadata metadata,
-        @Nullable NormalizedMountpoints mountPoints) implements NormalizedTree {
+        @Nullable NormalizedMountpoints mountPoints) implements NormalizedTuple {
     public NormalizationResult {
         requireNonNull(data);
     }