YANGTOOLS-706: finish evacuation of stmt.rfc6020.effective 15/65415/7
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 10 Nov 2017 17:00:39 +0000 (18:00 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 11 Nov 2017 13:43:52 +0000 (14:43 +0100)
This patch moves the rest of the effective statement classes to their
various places, reducing their visibility where possible.

The place for ImplicingChoiceCaseNode remains to be defined, as its
instantiation is related to the YANGTOOLS-724 mess.

Change-Id: Ia18f120ee7586deaa9b28f725d14822cd785ee9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
34 files changed:
yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/BuilderTest.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/AbstractEffectiveContainerSchemaNode.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveContainerSchemaNode.java with 75% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/AbstractEffectiveDataSchemaNode.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveDataSchemaNode.java with 90% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/AbstractEffectiveDocumentedDataNodeContainer.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/AbstractEffectiveSimpleDataNodeContainer.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveSimpleDataNodeContainer.java with 92% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/action/ActionEffectiveStatementImpl.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/anydata/AnydataEffectiveStatementImpl.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/anyxml/AnyxmlEffectiveStatementImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AnyxmlEffectiveStatementImpl.java with 93% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/anyxml/AnyxmlStatementSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/anyxml/YangModeledAnyXmlEffectiveStatementImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/YangModeledAnyXmlEffectiveStatementImpl.java with 89% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/case_/AbstractCaseStatementSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/case_/CaseEffectiveStatementImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/CaseEffectiveStatementImpl.java with 86% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/choice/AbstractChoiceStatementSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/choice/ChoiceEffectiveStatementImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ChoiceEffectiveStatementImpl.java with 88% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/choice/ImplicitChoiceCaseNode.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/CaseShorthandImpl.java with 91% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/container/AbstractContainerStatementSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/container/ContainerEffectiveStatementImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ContainerEffectiveStatementImpl.java with 94% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/input/AbstractInputStatementSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/input/InputEffectiveStatementImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/InputEffectiveStatementImpl.java with 91% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf/LeafEffectiveStatementImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/LeafEffectiveStatementImpl.java with 95% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf/LeafStatementSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf_list/AbstractLeafListStatementSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf_list/LeafListEffectiveStatementImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/LeafListEffectiveStatementImpl.java with 96% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/list/AbstractListStatementSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/list/ListEffectiveStatementImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ListEffectiveStatementImpl.java with 96% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/output/AbstractOutputStatementSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/output/OutputEffectiveStatementImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/OutputEffectiveStatementImpl.java with 91% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/rpc/RpcEffectiveStatementImpl.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/uses/UsesEffectiveStatementImpl.java [moved from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/UsesEffectiveStatementImpl.java with 94% similarity]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/uses/UsesStatementImpl.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/uses/UsesStatementSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/package-info.java [deleted file]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc8040/YangDataEffectiveStatementImpl.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/CaseStmtTest.java

index 70a457747eb7c3dd167b820281b77d12478c2c8b..fa55a459f02f192c904e16ae1a894ae327afe94a 100644 (file)
@@ -64,7 +64,6 @@ import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.YangModeledAnyXmlSchemaNode;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.ContainerEffectiveStatementImpl;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
 
 public class BuilderTest {
@@ -99,8 +98,8 @@ public class BuilderTest {
         final SchemaContext schema = YangParserTestUtils.parseYangFiles(leafRefTestYang);
         final Module module = schema.getModules().iterator().next();
         final DataSchemaNode root = module.getDataChildByName(ROOT_CONTAINER);
-        list = (ListSchemaNode)((ContainerEffectiveStatementImpl) root).getDataChildByName(LIST_MAIN);
-        leafList = (LeafListSchemaNode)((ContainerEffectiveStatementImpl) root).getDataChildByName(LEAF_LIST_MAIN);
+        list = (ListSchemaNode)((ContainerSchemaNode) root).getDataChildByName(LIST_MAIN);
+        leafList = (LeafListSchemaNode)((ContainerSchemaNode) root).getDataChildByName(LEAF_LIST_MAIN);
     }
 
     @Test
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt;
 
 import com.google.common.collect.ImmutableSet;
 import java.util.Collection;
@@ -15,11 +15,11 @@ import org.opendaylight.yangtools.yang.model.api.MustDefinition;
 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
-abstract class AbstractEffectiveContainerSchemaNode<D extends DeclaredStatement<QName>> extends
-        AbstractEffectiveSimpleDataNodeContainer<D> implements ContainerSchemaNode {
+public abstract class AbstractEffectiveContainerSchemaNode<D extends DeclaredStatement<QName>>
+        extends AbstractEffectiveSimpleDataNodeContainer<D> implements ContainerSchemaNode {
     private final Collection<MustDefinition> mustConstraints;
 
-    AbstractEffectiveContainerSchemaNode(final StmtContext<QName, D, ?> ctx) {
+    protected AbstractEffectiveContainerSchemaNode(final StmtContext<QName, D, ?> ctx) {
         super(ctx);
         mustConstraints = ImmutableSet.copyOf(allSubstatementsOfType(MustDefinition.class));
     }
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt;
 
 import java.util.Optional;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -13,7 +13,6 @@ import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.RevisionAwareXPath;
 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.WhenEffectiveStatement;
-import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveSchemaNode;
 import org.opendaylight.yangtools.yang.parser.spi.meta.CopyHistory;
 import org.opendaylight.yangtools.yang.parser.spi.meta.CopyType;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
@@ -28,7 +27,7 @@ public abstract class AbstractEffectiveDataSchemaNode<D extends DeclaredStatemen
     // FIXME: YANGTOOLS-724: this field should be final
     private boolean augmenting;
 
-    public AbstractEffectiveDataSchemaNode(final StmtContext<QName, D, ?> ctx) {
+    protected AbstractEffectiveDataSchemaNode(final StmtContext<QName, D, ?> ctx) {
         super(ctx);
         this.configuration = ctx.isConfiguration();
 
@@ -73,7 +72,7 @@ public abstract class AbstractEffectiveDataSchemaNode<D extends DeclaredStatemen
      *             which needs to be fixed. Do not introduce new callers. This deficiency is tracked in YANGTOOLS-724.
      */
     @Deprecated
-    protected final void resetAugmenting() {
+    public final void resetAugmenting() {
         augmenting = false;
     }
 }
index 5331eddf03101293c24aac00c8de7815c0ef9c60..052b247dce46ae0e7f691f558a06d646b94b6764 100644 (file)
@@ -29,10 +29,10 @@ import org.opendaylight.yangtools.yang.model.api.UsesNode;
 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.TypedefEffectiveStatement;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.choice.ImplicitChoiceCaseNode;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.source.AugmentToChoiceNamespace;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangValidationBundles;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.CaseShorthandImpl;
 
 public abstract class AbstractEffectiveDocumentedDataNodeContainer<A, D extends DeclaredStatement<A>>
         extends AbstractEffectiveDocumentedNode<A, D> implements DataNodeContainer {
@@ -63,7 +63,7 @@ public abstract class AbstractEffectiveDocumentedDataNodeContainer<A, D extends
                             && !(stmt instanceof ChoiceCaseNode || stmt instanceof ChoiceSchemaNode)
                             && YangValidationBundles.SUPPORTED_CASE_SHORTHANDS.contains(stmt.statementDefinition())
                             && Boolean.TRUE.equals(ctx.getFromNamespace(AugmentToChoiceNamespace.class, ctx))) {
-                        final CaseShorthandImpl caseShorthand = new CaseShorthandImpl(dataSchemaNode);
+                        final ImplicitChoiceCaseNode caseShorthand = new ImplicitChoiceCaseNode(dataSchemaNode);
                         mutableChildNodes.put(caseShorthand.getQName(), caseShorthand);
                         mutablePublicChildNodes.add(caseShorthand);
                     } else {
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
@@ -26,12 +26,11 @@ import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.WhenEffectiveStatement;
-import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDocumentedDataNodeContainer;
 import org.opendaylight.yangtools.yang.parser.spi.meta.CopyHistory;
 import org.opendaylight.yangtools.yang.parser.spi.meta.CopyType;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
-abstract class AbstractEffectiveSimpleDataNodeContainer<D extends DeclaredStatement<QName>> extends
+public abstract class AbstractEffectiveSimpleDataNodeContainer<D extends DeclaredStatement<QName>> extends
         AbstractEffectiveDocumentedDataNodeContainer<QName, D> implements DataNodeContainer, AugmentationTarget,
         DataSchemaNode {
 
@@ -45,7 +44,7 @@ abstract class AbstractEffectiveSimpleDataNodeContainer<D extends DeclaredStatem
     // FIXME: YANGTOOLS-724: this field should be final
     private boolean augmenting;
 
-    AbstractEffectiveSimpleDataNodeContainer(final StmtContext<QName, D, ?> ctx) {
+    protected AbstractEffectiveSimpleDataNodeContainer(final StmtContext<QName, D, ?> ctx) {
         super(ctx);
 
         this.path = ctx.getSchemaPath().get();
@@ -130,7 +129,7 @@ abstract class AbstractEffectiveSimpleDataNodeContainer<D extends DeclaredStatem
      *             which needs to be fixed. Do not introduce new callers. This deficiency is tracked in YANGTOOLS-724.
      */
     @Deprecated
-    protected void resetAugmenting() {
+    public final void resetAugmenting() {
         augmenting = false;
     }
 }
index 20d8cd9cc095c99ae8ccd6bf02f4d9698077d334..9f6f7c83a4fcecfd7eb7220f2fca62112145c7f8 100644 (file)
@@ -24,11 +24,11 @@ import org.opendaylight.yangtools.yang.model.api.stmt.ActionStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.TypedefEffectiveStatement;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveSchemaNode;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStmtUtils;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.input.InputEffectiveStatementImpl;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.output.OutputEffectiveStatementImpl;
 import org.opendaylight.yangtools.yang.parser.spi.meta.CopyHistory;
 import org.opendaylight.yangtools.yang.parser.spi.meta.CopyType;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.InputEffectiveStatementImpl;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.OutputEffectiveStatementImpl;
 
 final class ActionEffectiveStatementImpl extends AbstractEffectiveSchemaNode<ActionStatement>
         implements ActionDefinition, ActionEffectiveStatement {
index 82009ed2aadb37c5add95087541ed4054c8d070e..23d55bc222d8940aded7dfa55990e5941ecf6494 100644 (file)
@@ -22,8 +22,8 @@ import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.AnydataEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.AnydataStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.MandatoryEffectiveStatement;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDataSchemaNode;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.AbstractEffectiveDataSchemaNode;
 
 /**
  * YANG 1.1 AnyData effective statement implementation.
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.anyxml;
 
 import com.google.common.collect.ImmutableSet;
 import java.util.Collection;
@@ -19,8 +19,10 @@ import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.AnyxmlEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.AnyxmlStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.MandatoryEffectiveStatement;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDataSchemaNode;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
+// FIXME: hide this class
 public class AnyxmlEffectiveStatementImpl extends AbstractEffectiveDataSchemaNode<AnyxmlStatement>
         implements AnyxmlEffectiveStatement, AnyXmlSchemaNode, DerivableSchemaNode {
 
@@ -28,7 +30,7 @@ public class AnyxmlEffectiveStatementImpl extends AbstractEffectiveDataSchemaNod
     private final AnyXmlSchemaNode original;
     private final boolean mandatory;
 
-    public AnyxmlEffectiveStatementImpl(
+    AnyxmlEffectiveStatementImpl(
             final StmtContext<QName, AnyxmlStatement, EffectiveStatement<QName, AnyxmlStatement>> ctx) {
         super(ctx);
         this.original = (AnyXmlSchemaNode) ctx.getOriginalCtx().map(StmtContext::buildEffective).orElse(null);
index fb6fd42295a95d512ab64a8cbb04402acb8c6963..aca91c47e5c15e3becedefc2252fb4cf9b825ec2 100644 (file)
@@ -26,8 +26,6 @@ import org.opendaylight.yangtools.yang.parser.stmt.anyxmlschema.AnyxmlSchemaLoca
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.ChildSchemaNodes;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.SupportedExtensionsMapping;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.Utils;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.AnyxmlEffectiveStatementImpl;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.YangModeledAnyXmlEffectiveStatementImpl;
 
 public final class AnyxmlStatementSupport extends
         AbstractQNameStatementSupport<AnyxmlStatement, EffectiveStatement<QName, AnyxmlStatement>> {
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.anyxml;
 
 import static java.util.Objects.requireNonNull;
 
@@ -18,12 +18,12 @@ import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.AnyxmlStatement;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
-public final class YangModeledAnyXmlEffectiveStatementImpl extends AnyxmlEffectiveStatementImpl
+final class YangModeledAnyXmlEffectiveStatementImpl extends AnyxmlEffectiveStatementImpl
         implements YangModeledAnyXmlSchemaNode {
 
     private final ContainerSchemaNode schemaOfAnyXmlData;
 
-    public YangModeledAnyXmlEffectiveStatementImpl(final StmtContext<QName, AnyxmlStatement,
+    YangModeledAnyXmlEffectiveStatementImpl(final StmtContext<QName, AnyxmlStatement,
             EffectiveStatement<QName, AnyxmlStatement>> ctx, final ContainerSchemaNode contentSchema) {
         super(ctx);
         schemaOfAnyXmlData = requireNonNull(contentSchema);
index 89ee3679cb036e4c1f89fc171b812462185f3137..200e50e78407f3b91ff1280dcba79729e08f5a7a 100644 (file)
@@ -16,7 +16,6 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.ChildSchemaNodes;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.CaseEffectiveStatementImpl;
 
 abstract class AbstractCaseStatementSupport
         extends AbstractQNameStatementSupport<CaseStatement, EffectiveStatement<QName, CaseStatement>> {
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.case_;
 
 import java.util.Objects;
 import java.util.Optional;
@@ -15,16 +15,16 @@ import org.opendaylight.yangtools.yang.model.api.DerivableSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.CaseEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.CaseStatement;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveSimpleDataNodeContainer;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
-public final class CaseEffectiveStatementImpl extends AbstractEffectiveSimpleDataNodeContainer<CaseStatement>
+final class CaseEffectiveStatementImpl extends AbstractEffectiveSimpleDataNodeContainer<CaseStatement>
         implements CaseEffectiveStatement, ChoiceCaseNode, DerivableSchemaNode {
 
     private final ChoiceCaseNode original;
     private final boolean configuration;
 
-    public CaseEffectiveStatementImpl(
-            final StmtContext<QName, CaseStatement, EffectiveStatement<QName, CaseStatement>> ctx) {
+    CaseEffectiveStatementImpl(final StmtContext<QName, CaseStatement, EffectiveStatement<QName, CaseStatement>> ctx) {
         super(ctx);
         this.original = (ChoiceCaseNode) ctx.getOriginalCtx().map(StmtContext::buildEffective).orElse(null);
 
index 0f0fbbf7533c2030f98bec76572ecbcd75a1d971..ed8f7e5085199e00b7882d6b45822a7cd655fdcd 100644 (file)
@@ -20,7 +20,6 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.ChildSchemaNodes;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangValidationBundles;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.ChoiceEffectiveStatementImpl;
 
 abstract class AbstractChoiceStatementSupport extends
         AbstractQNameStatementSupport<ChoiceStatement, EffectiveStatement<QName, ChoiceStatement>> {
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.choice;
 
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.ImmutableSortedMap;
@@ -26,13 +26,19 @@ import org.opendaylight.yangtools.yang.model.api.stmt.ChoiceEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.ChoiceStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.DefaultEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.MandatoryEffectiveStatement;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDataSchemaNode;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.anyxml.AnyxmlEffectiveStatementImpl;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.container.ContainerEffectiveStatementImpl;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.leaf.LeafEffectiveStatementImpl;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.leaf_list.LeafListEffectiveStatementImpl;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.list.ListEffectiveStatementImpl;
 import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangValidationBundles;
 
-public final class ChoiceEffectiveStatementImpl extends AbstractEffectiveDataSchemaNode<ChoiceStatement> implements
-        ChoiceEffectiveStatement, ChoiceSchemaNode, DerivableSchemaNode {
+final class ChoiceEffectiveStatementImpl extends AbstractEffectiveDataSchemaNode<ChoiceStatement>
+        implements ChoiceEffectiveStatement, ChoiceSchemaNode, DerivableSchemaNode {
 
     private final Set<AugmentationSchemaNode> augmentations;
     private final SortedMap<QName, ChoiceCaseNode> cases;
@@ -40,7 +46,7 @@ public final class ChoiceEffectiveStatementImpl extends AbstractEffectiveDataSch
     private final ChoiceSchemaNode original;
     private final boolean mandatory;
 
-    public ChoiceEffectiveStatementImpl(
+    ChoiceEffectiveStatementImpl(
             final StmtContext<QName, ChoiceStatement, EffectiveStatement<QName, ChoiceStatement>> ctx) {
         super(ctx);
         this.original = (ChoiceSchemaNode) ctx.getOriginalCtx().map(StmtContext::buildEffective).orElse(null);
@@ -61,7 +67,7 @@ public final class ChoiceEffectiveStatementImpl extends AbstractEffectiveDataSch
             }
             if (YangValidationBundles.SUPPORTED_CASE_SHORTHANDS.contains(effectiveStatement.statementDefinition())) {
                 final DataSchemaNode dataSchemaNode = (DataSchemaNode) effectiveStatement;
-                final ChoiceCaseNode shorthandCase = new CaseShorthandImpl(dataSchemaNode);
+                final ChoiceCaseNode shorthandCase = new ImplicitChoiceCaseNode(dataSchemaNode);
                 // FIXME: we may be overwriting a previous entry, is that really okay?
                 casesInit.put(shorthandCase.getQName(), shorthandCase);
                 if (dataSchemaNode.isAugmenting() && !isAugmenting()) {
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.choice;
 
 import static java.util.Objects.requireNonNull;
 
@@ -32,14 +32,14 @@ import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.UsesNode;
 
 // FIXME: hide this somewhere
-public final class CaseShorthandImpl implements ChoiceCaseNode, DerivableSchemaNode {
+public final class ImplicitChoiceCaseNode implements ChoiceCaseNode, DerivableSchemaNode {
 
     private final DataSchemaNode caseShorthandNode;
     private final ChoiceCaseNode original;
     private final SchemaPath path;
     private final boolean augmenting;
 
-    public CaseShorthandImpl(final DataSchemaNode caseShorthandNode) {
+    public ImplicitChoiceCaseNode(final DataSchemaNode caseShorthandNode) {
         this.caseShorthandNode = requireNonNull(caseShorthandNode);
         this.path = requireNonNull(caseShorthandNode.getPath().getParent());
         this.original = getOriginalIfPresent(caseShorthandNode);
@@ -157,20 +157,20 @@ public final class CaseShorthandImpl implements ChoiceCaseNode, DerivableSchemaN
         if (getClass() != obj.getClass()) {
             return false;
         }
-        CaseShorthandImpl other = (CaseShorthandImpl) obj;
+        ImplicitChoiceCaseNode other = (ImplicitChoiceCaseNode) obj;
         return Objects.equals(getQName(), other.getQName()) && Objects.equals(path, other.path);
     }
 
     @Override
     public String toString() {
-        return CaseShorthandImpl.class.getSimpleName() + "[" + "qname=" + getQName() + "]";
+        return ImplicitChoiceCaseNode.class.getSimpleName() + "[" + "qname=" + getQName() + "]";
     }
 
     private static ChoiceCaseNode getOriginalIfPresent(final SchemaNode caseShorthandNode) {
         if (caseShorthandNode instanceof DerivableSchemaNode) {
             final Optional<? extends SchemaNode> original = ((DerivableSchemaNode) caseShorthandNode).getOriginal();
             if (original.isPresent()) {
-                return new CaseShorthandImpl((DataSchemaNode) original.get());
+                return new ImplicitChoiceCaseNode((DataSchemaNode) original.get());
             }
         }
         return null;
index 7314fcaf0604012ba1777f134812562b7fea757f..72ec3c5bf3f2ae10678e5d38ca6d4065a409f6d3 100644 (file)
@@ -16,7 +16,6 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.ChildSchemaNodes;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.ContainerEffectiveStatementImpl;
 
 abstract class AbstractContainerStatementSupport
         extends AbstractQNameStatementSupport<ContainerStatement, EffectiveStatement<QName, ContainerStatement>> {
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.container;
 
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.ImmutableSet.Builder;
@@ -21,8 +21,10 @@ import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.ContainerEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.ContainerStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.PresenceEffectiveStatement;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveContainerSchemaNode;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
+// FIXME: hide this class
 public final class ContainerEffectiveStatementImpl extends AbstractEffectiveContainerSchemaNode<ContainerStatement>
         implements ContainerEffectiveStatement, DerivableSchemaNode {
     private final Set<ActionDefinition> actions;
@@ -30,7 +32,7 @@ public final class ContainerEffectiveStatementImpl extends AbstractEffectiveCont
     private final ContainerSchemaNode original;
     private final boolean presence;
 
-    public ContainerEffectiveStatementImpl(
+    ContainerEffectiveStatementImpl(
             final StmtContext<QName, ContainerStatement, EffectiveStatement<QName, ContainerStatement>> ctx) {
         super(ctx);
         this.original = (ContainerSchemaNode) ctx.getOriginalCtx().map(StmtContext::buildEffective).orElse(null);
index a5c727cf39a4c2f3e88d1cccc7e6ad84445bb57b..694e287b07ab70a80e6dc2306ac7a374839f1c0e 100644 (file)
@@ -16,7 +16,6 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.ChildSchemaNodes;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.InputEffectiveStatementImpl;
 
 abstract class AbstractInputStatementSupport
         extends AbstractQNameStatementSupport<InputStatement, EffectiveStatement<QName, InputStatement>> {
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.input;
 
 import com.google.common.collect.ImmutableSet;
 import java.util.Objects;
@@ -16,12 +16,14 @@ import org.opendaylight.yangtools.yang.model.api.NotificationDefinition;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.InputEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.InputStatement;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveContainerSchemaNode;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
+// FIXME: hide this class
 public final class InputEffectiveStatementImpl extends AbstractEffectiveContainerSchemaNode<InputStatement>
         implements InputEffectiveStatement {
 
-    public InputEffectiveStatementImpl(
+    InputEffectiveStatementImpl(
             final StmtContext<QName, InputStatement, EffectiveStatement<QName, InputStatement>> ctx) {
         super(ctx);
     }
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.leaf;
 
 import com.google.common.collect.ImmutableSet;
 import java.util.Collection;
@@ -28,10 +28,12 @@ import org.opendaylight.yangtools.yang.model.api.stmt.TypeEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.UnitsEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.util.type.ConcreteTypeBuilder;
 import org.opendaylight.yangtools.yang.model.util.type.ConcreteTypes;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDataSchemaNode;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.TypeUtils;
 
+// FIXME: hide this class
 public final class LeafEffectiveStatementImpl extends AbstractEffectiveDataSchemaNode<LeafStatement>
         implements LeafEffectiveStatement, LeafSchemaNode, DerivableSchemaNode {
     private final Collection<MustDefinition> mustConstraints;
@@ -41,8 +43,7 @@ public final class LeafEffectiveStatementImpl extends AbstractEffectiveDataSchem
     private final String unitsStr;
     private final boolean mandatory;
 
-    public LeafEffectiveStatementImpl(
-            final StmtContext<QName, LeafStatement, EffectiveStatement<QName, LeafStatement>> ctx) {
+    LeafEffectiveStatementImpl(final StmtContext<QName, LeafStatement, EffectiveStatement<QName, LeafStatement>> ctx) {
         super(ctx);
         this.original = (LeafSchemaNode) ctx.getOriginalCtx().map(StmtContext::buildEffective).orElse(null);
 
index 467d74643d3acaf7581d8c0c2d4ae8d41be80c54..12bab1a3645c4398949e188e81f94245c1a6898b 100644 (file)
@@ -17,7 +17,6 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
 import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.ChildSchemaNodes;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.LeafEffectiveStatementImpl;
 
 public final class LeafStatementSupport
         extends AbstractQNameStatementSupport<LeafStatement, EffectiveStatement<QName, LeafStatement>> {
index 0e99c68226437b25c9f9387f3ddbb3b9fcf49fab..b89198137bb0a53208bc54d7b06fea2f66aa507f 100644 (file)
@@ -16,7 +16,6 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.ChildSchemaNodes;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.LeafListEffectiveStatementImpl;
 
 abstract class AbstractLeafListStatementSupport
         extends AbstractQNameStatementSupport<LeafListStatement, EffectiveStatement<QName, LeafListStatement>> {
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.leaf_list;
 
 import com.google.common.collect.ImmutableSet;
 import java.util.Collection;
@@ -30,11 +30,13 @@ import org.opendaylight.yangtools.yang.model.api.stmt.TypeEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.UnitsEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.util.type.ConcreteTypeBuilder;
 import org.opendaylight.yangtools.yang.model.util.type.ConcreteTypes;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDataSchemaNode;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStmtUtils;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.TypeUtils;
 
+// FIXME: hide this class
 public final class LeafListEffectiveStatementImpl extends AbstractEffectiveDataSchemaNode<LeafListStatement>
         implements LeafListEffectiveStatement, LeafListSchemaNode, DerivableSchemaNode {
 
@@ -47,7 +49,7 @@ public final class LeafListEffectiveStatementImpl extends AbstractEffectiveDataS
     private final Collection<MustDefinition> mustConstraints;
     private final ElementCountConstraint elementCountConstraint;
 
-    public LeafListEffectiveStatementImpl(
+    LeafListEffectiveStatementImpl(
             final StmtContext<QName, LeafListStatement, EffectiveStatement<QName, LeafListStatement>> ctx) {
         super(ctx);
         this.original = (LeafListSchemaNode) ctx.getOriginalCtx().map(StmtContext::buildEffective).orElse(null);
index 94eccd15bf16e2db57067a46fd82e40b8e0e1402..507836fa9ccf2c8b96c5102cc5e615b6b1bbc1ea 100644 (file)
@@ -16,7 +16,6 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.ChildSchemaNodes;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.ListEffectiveStatementImpl;
 
 abstract class AbstractListStatementSupport
         extends AbstractQNameStatementSupport<ListStatement, EffectiveStatement<QName, ListStatement>> {
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.list;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
@@ -33,10 +33,12 @@ import org.opendaylight.yangtools.yang.model.api.stmt.ListEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.ListStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.OrderedByEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveSimpleDataNodeContainer;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStmtUtils;
 import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
+// FIXME: hide this class
 public final class ListEffectiveStatementImpl extends AbstractEffectiveSimpleDataNodeContainer<ListStatement>
         implements ListEffectiveStatement, ListSchemaNode, DerivableSchemaNode {
     private static final String ORDER_BY_USER_KEYWORD = "user";
@@ -50,7 +52,7 @@ public final class ListEffectiveStatementImpl extends AbstractEffectiveSimpleDat
     private final ElementCountConstraint elementCountConstraint;
     private final Collection<MustDefinition> mustConstraints;
 
-    public ListEffectiveStatementImpl(
+    ListEffectiveStatementImpl(
             final StmtContext<QName, ListStatement, EffectiveStatement<QName, ListStatement>> ctx) {
         super(ctx);
 
index 8b6856ac5f7338127748437b3598fb00f9cd0cc3..124dd8595622149b5bcb5d8500d05a021f470872 100644 (file)
@@ -16,7 +16,6 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.ChildSchemaNodes;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.OutputEffectiveStatementImpl;
 
 abstract class AbstractOutputStatementSupport extends
         AbstractQNameStatementSupport<OutputStatement, EffectiveStatement<QName, OutputStatement>> {
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.output;
 
 import com.google.common.collect.ImmutableSet;
 import java.util.Objects;
@@ -16,12 +16,14 @@ import org.opendaylight.yangtools.yang.model.api.NotificationDefinition;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.OutputEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.OutputStatement;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveContainerSchemaNode;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
+// FIXME: hide this class
 public final class OutputEffectiveStatementImpl extends AbstractEffectiveContainerSchemaNode<OutputStatement>
         implements OutputEffectiveStatement {
 
-    public OutputEffectiveStatementImpl(
+    OutputEffectiveStatementImpl(
             final StmtContext<QName, OutputStatement, EffectiveStatement<QName, OutputStatement>> ctx) {
         super(ctx);
     }
index 4f67e696782fece4f439b4b2775a7ca5bbbde907..b5b8556c4c3d513734143cc7fc951dfa6305aaf6 100644 (file)
@@ -23,9 +23,9 @@ import org.opendaylight.yangtools.yang.model.api.stmt.RpcStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.TypedefEffectiveStatement;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveSchemaNode;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStmtUtils;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.input.InputEffectiveStatementImpl;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.output.OutputEffectiveStatementImpl;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.InputEffectiveStatementImpl;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.OutputEffectiveStatementImpl;
 
 final class RpcEffectiveStatementImpl extends AbstractEffectiveSchemaNode<RpcStatement>
         implements RpcDefinition, RpcEffectiveStatement {
@@ -5,7 +5,7 @@
  * 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.parser.stmt.rfc6020.effective;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.uses;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
@@ -38,7 +38,7 @@ import org.opendaylight.yangtools.yang.parser.spi.GroupingNamespace;
 import org.opendaylight.yangtools.yang.parser.spi.meta.CopyType;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
-public final class UsesEffectiveStatementImpl extends AbstractEffectiveDocumentedNode<QName, UsesStatement>
+final class UsesEffectiveStatementImpl extends AbstractEffectiveDocumentedNode<QName, UsesStatement>
         implements UsesEffectiveStatement, UsesNode {
     private final SchemaPath groupingPath;
     private final boolean addedByUses;
@@ -47,8 +47,7 @@ public final class UsesEffectiveStatementImpl extends AbstractEffectiveDocumente
     private final List<UnknownSchemaNode> unknownNodes;
     private final RevisionAwareXPath whenCondition;
 
-    public UsesEffectiveStatementImpl(
-            final StmtContext<QName, UsesStatement, EffectiveStatement<QName, UsesStatement>> ctx) {
+    UsesEffectiveStatementImpl(final StmtContext<QName, UsesStatement, EffectiveStatement<QName, UsesStatement>> ctx) {
         super(ctx);
 
         // initGroupingPath
index 48c61586a0f7eb0b588aa0a2d83a4971bfce02d8..89649acd26b12e4c99a9a28453ba71b93771a4e6 100644 (file)
@@ -196,10 +196,8 @@ final class UsesStatementImpl extends AbstractDeclaredStatement<QName> implement
             "Invalid refine argument %s. It must be instance of SchemaNodeIdentifier.", refineArgument);
 
         final SchemaNodeIdentifier refineTargetNodeIdentifier = (SchemaNodeIdentifier) refineArgument;
-        final StatementContextBase<?, ?, ?> refineTargetNodeCtx = Utils.findNode(usesParentCtx,
-                refineTargetNodeIdentifier);
-
-        InferenceException.throwIfNull(refineTargetNodeCtx, subStmtCtx.getStatementSourceReference(),
+        final StatementContextBase<?, ?, ?> refineTargetNodeCtx = InferenceException.throwIfNull(
+            Utils.findNode(usesParentCtx, refineTargetNodeIdentifier), subStmtCtx.getStatementSourceReference(),
             "Refine target node %s not found.", refineTargetNodeIdentifier);
 
         if (StmtContextUtils.isUnknownStatement(refineTargetNodeCtx)) {
index ba16a93cac3598d1bc8371bbc17bae3d04735e76..2a0da20911c0d8eda249a7099ff97340b428c8e1 100644 (file)
@@ -26,7 +26,6 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
 import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 import org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementContextBase;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.UsesEffectiveStatementImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/package-info.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/package-info.java
deleted file mode 100644 (file)
index 12cb041..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2017 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
- */
-
-/**
- * Contains implementation of Rfc6020 effective statements. This package
- * may also contain common implementation for both Rfc6020 and Rfc7950 statements,
- * if there are no or minimal differences between these statements.
- */
-package org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective;
\ No newline at end of file
index 6c5b269832509e12a8d498b4edaed92b5acd03a7..117545b3f2a038f6405ddbd2dc94be7dca848725 100644 (file)
@@ -19,9 +19,9 @@ import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.UnknownEffectiveStatementBase;
+import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.container.ContainerEffectiveStatementImpl;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.ContainerEffectiveStatementImpl;
 
 @Beta
 final class YangDataEffectiveStatementImpl extends UnknownEffectiveStatementBase<String, YangDataStatement>
index 28ac16d895b421ceb284ff72bfc3d79370dbf772..16638db0f43259ee314960f00b835a1aaaab92b6 100644 (file)
@@ -21,12 +21,12 @@ import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.opendaylight.yangtools.yang.common.Revision;
 import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode;
+import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.ChoiceEffectiveStatementImpl;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.ContainerEffectiveStatementImpl;
 
 public class CaseStmtTest {
     private SchemaContext schema;
@@ -61,10 +61,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-fff"));
         assertNotNull(tempChild);
         assertFalse(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -74,10 +74,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-ffn"));
         assertNotNull(tempChild);
         assertFalse(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -87,10 +87,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-fnf"));
         assertNotNull(tempChild);
         assertFalse(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -100,10 +100,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-nff"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -113,10 +113,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-nnf"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -126,10 +126,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-nfn"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -139,10 +139,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-fnn"));
         assertNotNull(tempChild);
         assertFalse(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -152,10 +152,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-ttt"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -165,10 +165,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-ttn"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -178,10 +178,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-tnt"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -191,10 +191,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-ntt"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -204,10 +204,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-nnt"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -217,10 +217,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-ntn"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -230,10 +230,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-tnn"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -243,10 +243,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-tff"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -256,10 +256,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-tnf"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -269,10 +269,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-tfn"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -282,10 +282,10 @@ public class CaseStmtTest {
         tempChild = rootFoo.getDataChildByName(QName.create(qnameFoo, "root-ntf"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -298,10 +298,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-fff"));
         assertNotNull(tempChild);
         assertFalse(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -311,10 +311,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-ffn"));
         assertNotNull(tempChild);
         assertFalse(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -324,10 +324,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-fnf"));
         assertNotNull(tempChild);
         assertFalse(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -337,10 +337,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-nff"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -350,10 +350,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-nnf"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -363,10 +363,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-nfn"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -376,10 +376,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-fnn"));
         assertNotNull(tempChild);
         assertFalse(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -389,10 +389,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-ttt"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -402,10 +402,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-ttn"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -415,10 +415,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-tnt"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -428,10 +428,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-ntt"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -441,10 +441,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-nnt"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -454,10 +454,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-ntn"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -467,10 +467,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-tnn"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertTrue(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -480,10 +480,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-tff"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -493,10 +493,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-tnf"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -506,10 +506,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-tfn"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertFalse(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();
@@ -519,10 +519,10 @@ public class CaseStmtTest {
         tempChild = rootBar.getDataChildByName(QName.create(qnameBar, "sh-root-ntf"));
         assertNotNull(tempChild);
         assertTrue(tempChild.isConfiguration());
-        tempSecondChild = ((ContainerEffectiveStatementImpl) tempChild).getChildNodes().iterator().next();
+        tempSecondChild = ((ContainerSchemaNode) tempChild).getChildNodes().iterator().next();
         assertNotNull(tempSecondChild);
         assertTrue(tempSecondChild.isConfiguration());
-        tempChoice = ((ChoiceEffectiveStatementImpl) tempSecondChild).getCases().values().iterator().next();
+        tempChoice = ((ChoiceSchemaNode) tempSecondChild).getCases().values().iterator().next();
         assertNotNull(tempChoice);
         assertFalse(tempChoice.isConfiguration());
         tempThirdChild = tempChoice.getChildNodes().iterator().next();