Bug 4662: Introduce a SemanticVersion concept - pre-linkage phase
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / spi / meta / ModelProcessingPhase.java
index 3dbf52de9b30c214fa9c24b2fd10e2590acd382b..3fe2ccc0f110040d9de60f24b9ba9776cfa24111 100644 (file)
@@ -10,21 +10,27 @@ package org.opendaylight.yangtools.yang.parser.spi.meta;
 import javax.annotation.Nullable;
 
 public enum ModelProcessingPhase {
+    INIT(null),
+    /**
+     *
+     * Preliminary cross-source relationship resolution phase which collects
+     * available module names and module namespaces. It is necessary in order to
+     * correct resolution of unknown statements used in linkage phase (e.g.
+     * semantic version of yang modules).
+     */
+    SOURCE_PRE_LINKAGE(INIT),
     /**
      *
      * Cross-source relationship resolution phase.
      * <p>
-     * In this phase of processing only statements which affects
-     * cross-source relationship (e.g. imports / includes)
-     * are processed.
+     * In this phase of processing only statements which affects cross-source
+     * relationship (e.g. imports / includes) are processed.
      * <p>
-     * At end of this phase all source related contexts should
-     * be bind to their imports and includes to allow
-     * visibility of custom defined statements in following
-     * phases.
+     * At end of this phase all source related contexts should be bind to their
+     * imports and includes to allow visibility of custom defined statements in
+     * following phases.
      */
-    INIT(null),
-    SOURCE_LINKAGE(INIT),
+    SOURCE_LINKAGE(SOURCE_PRE_LINKAGE),
     STATEMENT_DEFINITION(SOURCE_LINKAGE),
     FULL_DECLARATION(STATEMENT_DEFINITION),
     EFFECTIVE_MODEL(FULL_DECLARATION);