Add YANG Schema Mount parser support
[yangtools.git] / yang / rfc8528-model-api / src / main / java / org / opendaylight / yangtools / rfc8528 / model / api / SchemaMountConstants.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech s.r.o. 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.rfc8528.model.api;
9
10 import com.google.common.collect.ImmutableList;
11 import java.net.URI;
12 import java.util.Collection;
13 import org.eclipse.jdt.annotation.NonNullByDefault;
14 import org.opendaylight.yangtools.yang.common.QNameModule;
15 import org.opendaylight.yangtools.yang.common.Revision;
16 import org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier;
17 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
18
19 /**
20  * Constants associated with RFC8528.
21  *
22  * @author Robert Varga
23  */
24 @NonNullByDefault
25 public final class SchemaMountConstants {
26     private static final String MODULE_NAME = "ietf-yang-schema-mount";
27     private static final URI MODULE_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount");
28     private static final Revision RFC8528_REVISION = Revision.of("2019-01-14");
29
30     /**
31      * Runtime RFC8528 identity.
32      */
33     public static final QNameModule RFC8528_MODULE = QNameModule.create(MODULE_NAMESPACE, RFC8528_REVISION).intern();
34
35     /**
36      * RFC8528 model source name.
37      */
38     public static final SourceIdentifier RFC8528_SOURCE = RevisionSourceIdentifier.create(MODULE_NAME,
39         RFC8528_REVISION);
40
41     /**
42      * Normative prefix to use when importing {@link #RFC8528_SOURCE}.
43      */
44     public static final String MODULE_PREFIX = "yangmnt";
45
46     private SchemaMountConstants() {
47         throw new UnsupportedOperationException();
48     }
49
50     /**
51      * Return identifiers of all sources known to define the metadata extension.
52      *
53      * @return Collection of identifiers.
54      */
55     public static Collection<SourceIdentifier> knownModelSources() {
56         return ImmutableList.of(RFC8528_SOURCE);
57     }
58 }