3b362cf8b8a79a92f81a4163761be79cd73bfa3e
[yangtools.git] / yang / yang-common / src / main / java / org / opendaylight / yangtools / yang / common / YangConstants.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.common;
9
10 import java.net.URI;
11
12 /**
13  * Constant definitions present in RFC documents related to the YANG language.
14  */
15 public final class YangConstants {
16     /**
17      * YANG File Extension, as defined in https://tools.ietf.org/html/rfc6020#section-14.1.
18      */
19     public static final String RFC6020_YANG_FILE_EXTENSION = ".yang";
20
21     /**
22      * YANG Media Type, as defined in https://tools.ietf.org/html/rfc6020#section-14.1.
23      */
24     public static final String RFC6020_YANG_MAC_FILE_TYPE = "TEXT";
25
26
27     /**
28      * YANG Media Type, as defined in https://tools.ietf.org/html/rfc6020#section-14.1.
29      */
30     public static final String RFC6020_YANG_MEDIA_TYPE = "application/yang";
31
32     /**
33      * YANG namespace, as defined in https://tools.ietf.org/html/rfc6020#section-14.
34      */
35     public static final URI RFC6020_YANG_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:1");
36
37     /**
38      * Base QNameModule for all YANG statements.
39      */
40     public static final QNameModule RFC6020_YANG_MODULE = QNameModule.create(RFC6020_YANG_NAMESPACE, null).intern();
41
42     /**
43      * YIN File Extension, as defined in https://tools.ietf.org/html/rfc6020#section-14.2.
44      */
45     public static final String RFC6020_YIN_FILE_EXTENSION = ".yin";
46
47     /**
48      * YANG Media Type, as defined in https://tools.ietf.org/html/rfc6020#section-14.1.
49      */
50     public static final String RFC6020_MAC_FILE_TYPE = "TEXT";
51
52     /**
53      * YANG Media Type, as defined in https://tools.ietf.org/html/rfc6020#section-14.1.
54      */
55     public static final String RFC6020_YIN_MEDIA_TYPE = "application/xml+yin";
56
57     /**
58      * YIN namespace, as defined in https://tools.ietf.org/html/rfc6020#section-14.
59      */
60     public static final URI RFC6020_YIN_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:yin:1");
61
62     /**
63      * Base QNameModule for all YIN statements.
64      */
65     public static final QNameModule RFC6020_YIN_MODULE = QNameModule.create(RFC6020_YIN_NAMESPACE, null).intern();
66
67     /**
68      * YANG Library NETCONF Capability, as defined in https://tools.ietf.org/html/rfc7950#section-16.
69      */
70     public static final URI RFC7950_YANG_LIBRARY_CAPABILITY =
71         URI.create("urn:ietf:params:netconf:capability:yang-library:1.0");
72
73     /**
74      * Prefix for YANG-specific XPath functions
75      */
76     public static final String YANG_XPATH_FUNCTIONS_PREFIX = "yang";
77
78     private YangConstants() {
79         throw new UnsupportedOperationException("Utility class");
80     }
81 }