Remove RevisionSourceIdentifier
[yangtools.git] / model / rfc8639-model-api / src / main / java / org / opendaylight / yangtools / rfc8639 / model / api / SubscribedNotificationsConstants.java
1 /*
2  * Copyright (c) 2021 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.rfc8639.model.api;
9
10 import com.google.common.collect.ImmutableList;
11 import java.util.Collection;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.opendaylight.yangtools.yang.common.QNameModule;
14 import org.opendaylight.yangtools.yang.common.Revision;
15 import org.opendaylight.yangtools.yang.common.UnresolvedQName.Unqualified;
16 import org.opendaylight.yangtools.yang.common.XMLNamespace;
17 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
18
19 /**
20  * Constants associated with RFC8639.
21  */
22 @NonNullByDefault
23 public final class SubscribedNotificationsConstants {
24     private static final Unqualified MODULE_NAME = Unqualified.of("ietf-subscribed-notifications").intern();
25     private static final XMLNamespace MODULE_NAMESPACE =
26         XMLNamespace.of("urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications").intern();
27     private static final Revision RFC8639_REVISION = Revision.of("2019-09-09");
28
29     /**
30      * Runtime RFC8639 identity.
31      */
32     public static final QNameModule RFC8639_MODULE = QNameModule.create(MODULE_NAMESPACE, RFC8639_REVISION).intern();
33
34     /**
35      * RFC8639 model source name.
36      */
37     public static final SourceIdentifier RFC8639_SOURCE = new SourceIdentifier(MODULE_NAME, RFC8639_REVISION);
38
39     /**
40      * Normative prefix to use when importing {@link #RFC8639_SOURCE}.
41      */
42     public static final String MODULE_PREFIX = "sn";
43
44     private SubscribedNotificationsConstants() {
45         // Hidden on purpose
46     }
47
48     /**
49      * Return identifiers of all sources known to define the metadata extension.
50      *
51      * @return Collection of identifiers.
52      */
53     public static Collection<SourceIdentifier> knownModelSources() {
54         return ImmutableList.of(RFC8639_SOURCE);
55     }
56 }