Fix eclipse/checkstyle warnings
[yangtools.git] / yang / yang-common / src / main / java / org / opendaylight / yangtools / yang / common / YangConstants.java
index dbc25eb5b9552be1d0e728bdf8c7aba470f8f171..3f93818b72e9c7bd2cc9896dd612fd3794add069 100644 (file)
@@ -14,27 +14,68 @@ import java.net.URI;
  */
 public final class YangConstants {
     /**
-     * YANG namespace, as defined in RFC 6020.
+     * YANG File Extension, as defined in https://tools.ietf.org/html/rfc6020#section-14.1.
      */
-    public static final URI RFC6020_YANG_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:1");
+    public static final String RFC6020_YANG_FILE_EXTENSION = ".yang";
 
     /**
-     * YIN namespace, as defined in RFC 6020.
+     * YANG Media Type, as defined in https://tools.ietf.org/html/rfc6020#section-14.1.
      */
-    public static final URI RFC6020_YIN_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:yin:1");
+    public static final String RFC6020_YANG_MAC_FILE_TYPE = "TEXT";
+
+
+    /**
+     * YANG Media Type, as defined in https://tools.ietf.org/html/rfc6020#section-14.1.
+     */
+    public static final String RFC6020_YANG_MEDIA_TYPE = "application/yang";
+
+    /**
+     * YANG namespace, as defined in https://tools.ietf.org/html/rfc6020#section-14.
+     */
+    public static final URI RFC6020_YANG_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:1");
 
     /**
      * Base QNameModule for all YANG statements.
      */
-    public static final QNameModule RFC6020_YANG_MODULE = QNameModule.cachedReference(QNameModule.create(RFC6020_YANG_NAMESPACE, null));
+    public static final QNameModule RFC6020_YANG_MODULE = QNameModule.create(RFC6020_YANG_NAMESPACE, null).intern();
+
+    /**
+     * YIN File Extension, as defined in https://tools.ietf.org/html/rfc6020#section-14.2.
+     */
+    public static final String RFC6020_YIN_FILE_EXTENSION = ".yin";
+
+    /**
+     * YANG Media Type, as defined in https://tools.ietf.org/html/rfc6020#section-14.1.
+     */
+    public static final String RFC6020_MAC_FILE_TYPE = "TEXT";
+
+    /**
+     * YANG Media Type, as defined in https://tools.ietf.org/html/rfc6020#section-14.1.
+     */
+    public static final String RFC6020_YIN_MEDIA_TYPE = "application/xml+yin";
+
+    /**
+     * YIN namespace, as defined in https://tools.ietf.org/html/rfc6020#section-14.
+     */
+    public static final URI RFC6020_YIN_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:yin:1");
 
     /**
      * Base QNameModule for all YIN statements.
      */
-    public static final QNameModule RFC6020_YIN_MODULE = QNameModule.cachedReference(QNameModule.create(RFC6020_YIN_NAMESPACE, null));
+    public static final QNameModule RFC6020_YIN_MODULE = QNameModule.create(RFC6020_YIN_NAMESPACE, null).intern();
+
+    /**
+     * YANG Library NETCONF Capability, as defined in https://tools.ietf.org/html/rfc7950#section-16.
+     */
+    public static final URI RFC7950_YANG_LIBRARY_CAPABILITY =
+        URI.create("urn:ietf:params:netconf:capability:yang-library:1.0");
+
+    /**
+     * Prefix for YANG-specific XPath functions.
+     */
+    public static final String YANG_XPATH_FUNCTIONS_PREFIX = "yang";
 
     private YangConstants() {
         throw new UnsupportedOperationException("Utility class");
     }
-
 }