Introduce DataObject{Identifier,Reference}
[yangtools.git] / parser / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / impl / DefaultReactors.java
index 3255c36ceca5f6cecee28289ff69c31371fe0d81..cf2032b723298b01ee2c8419daee607c5c4511be 100644 (file)
@@ -16,6 +16,7 @@ import org.opendaylight.yangtools.odlext.parser.InstanceTargetStatementSupport;
 import org.opendaylight.yangtools.odlext.parser.RpcContextReferenceStatementSupport;
 import org.opendaylight.yangtools.openconfig.parser.EncryptedValueStatementSupport;
 import org.opendaylight.yangtools.openconfig.parser.HashedValueStatementSupport;
+import org.opendaylight.yangtools.openconfig.parser.OpenConfigVersionSupport;
 import org.opendaylight.yangtools.rfc6241.parser.GetFilterElementAttributesStatementSupport;
 import org.opendaylight.yangtools.rfc6536.parser.DefaultDenyAllStatementSupport;
 import org.opendaylight.yangtools.rfc6536.parser.DefaultDenyWriteStatementSupport;
@@ -27,10 +28,10 @@ import org.opendaylight.yangtools.rfc6643.parser.MaxAccessStatementSupport;
 import org.opendaylight.yangtools.rfc6643.parser.OidStatementSupport;
 import org.opendaylight.yangtools.rfc6643.parser.SubIdStatementSupport;
 import org.opendaylight.yangtools.rfc7952.parser.AnnotationStatementSupport;
-import org.opendaylight.yangtools.rfc8040.parser.YangDataArgumentNamespace;
 import org.opendaylight.yangtools.rfc8040.parser.YangDataStatementSupport;
 import org.opendaylight.yangtools.rfc8528.parser.MountPointStatementSupport;
 import org.opendaylight.yangtools.rfc8639.parser.SubscriptionStateNotificationStatementSupport;
+import org.opendaylight.yangtools.rfc8819.parser.ModuleTagStatementSupport;
 import org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration;
 import org.opendaylight.yangtools.yang.parser.rfc7950.reactor.CustomCrossSourceStatementReactorBuilder;
 import org.opendaylight.yangtools.yang.parser.rfc7950.reactor.RFC7950Reactors;
@@ -120,53 +121,50 @@ public final class DefaultReactors {
     private static @NonNull CustomCrossSourceStatementReactorBuilder addExtensions(
             final @NonNull CustomCrossSourceStatementReactorBuilder builder, final YangParserConfiguration config) {
         return builder
-                // OpenDaylight extensions
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
-                    new AugmentIdentifierStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new ContextInstanceStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
-                    new ContextReferenceStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new InstanceTargetStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
-                    new RpcContextReferenceStatementSupport(config))
-
-                // RFC6241 get-filter-element-attributes support
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
-                    new GetFilterElementAttributesStatementSupport(config))
-
-                // RFC6536 default-deny-{all,write} support
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
-                    new DefaultDenyAllStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
-                    new DefaultDenyWriteStatementSupport(config))
-
-                // RFC6643 extensions
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new DisplayHintStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new MaxAccessStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new DefValStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new ImpliedStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new AliasStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new OidStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new SubIdStatementSupport(config))
-
-                // RFC7952 annotation support
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new AnnotationStatementSupport(config))
-
-                // RFC8040 yang-data support
-                .addNamespaceSupport(ModelProcessingPhase.FULL_DECLARATION, YangDataArgumentNamespace.BEHAVIOUR)
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new YangDataStatementSupport(config))
-
-                // RFC8528 mount-point support
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new MountPointStatementSupport(config))
-
-                // RFC8639 subscription-state-notification support
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
-                    new SubscriptionStateNotificationStatementSupport(config))
-
-                // OpenConfig extensions support (except openconfig-version)
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
-                    new EncryptedValueStatementSupport(config))
-                .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
-                    new HashedValueStatementSupport(config));
+            // OpenDaylight extensions
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new AugmentIdentifierStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new ContextInstanceStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new ContextReferenceStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new InstanceTargetStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new RpcContextReferenceStatementSupport(config))
+
+            // RFC6241 get-filter-element-attributes support
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
+                new GetFilterElementAttributesStatementSupport(config))
+
+            // RFC6536 default-deny-{all,write} support
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new DefaultDenyAllStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new DefaultDenyWriteStatementSupport(config))
+
+            // RFC6643 extensions
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new DisplayHintStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new MaxAccessStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new DefValStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new ImpliedStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new AliasStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new OidStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new SubIdStatementSupport(config))
+
+            // RFC7952 annotation support
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new AnnotationStatementSupport(config))
+
+            // RFC8040 yang-data support
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new YangDataStatementSupport(config))
+            .addNamespaceSupport(ModelProcessingPhase.FULL_DECLARATION, YangDataStatementSupport.BEHAVIOUR)
+
+            // RFC8528 mount-point support
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new MountPointStatementSupport(config))
+
+            // RFC8639 subscription-state-notification support
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
+                new SubscriptionStateNotificationStatementSupport(config))
+
+            // RFC8819 module-tag extension support
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new ModuleTagStatementSupport(config))
+
+            // OpenConfig extensions support
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new EncryptedValueStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new HashedValueStatementSupport(config))
+            .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, new OpenConfigVersionSupport(config));
     }
 }