2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.yangtools.yang.model.api;
12 import java.util.Date;
13 import org.opendaylight.yangtools.concepts.SemVer;
14 import org.opendaylight.yangtools.yang.common.QNameModule;
17 public interface ModuleIdentifier {
19 * Returns a {@link QNameModule}, which contains the namespace and
20 * the revision of the module.
22 * @return QNameModule identifier.
24 QNameModule getQNameModule();
27 * Returns the name of the module which is specified as argument of YANG
28 * {@link Module <b><font color="#FF0000">module</font></b>} keyword
30 * @return string with the name of the module
35 * Returns the namespace of the module which is specified as argument of
36 * YANG {@link Module <b><font color="#00FF00">namespace</font></b>}
37 * keyword. If you need both namespace and revision, please consider using
38 * {@link #getQNameModule()}.
40 * @return URI format of the namespace of the module
42 // FIXME: 2.0.0: should be a default method calling getQNameModule().getNamespace()
46 * Returns the revision date for the module. If you need both namespace and
47 * revision, please consider using {@link #getQNameModule()}.
49 * @return date of the module revision which is specified as argument of
50 * YANG {@link Module <b><font color="#339900">revison</font></b>}
53 // FIXME: BUG-4688: should return Revision
54 // FIXME: BUG-4688: should be a default method calling getQNameModule().getRevision().get()
58 * Returns the openconfig version of yang module.
60 * If the openconfig version is not specified, default openconfig version of
63 * @return SemVer openconfig version of yang module which is specified as
65 * (http://openconfig.net/yang/openconfig-ext)openconfig-version statement
67 default SemVer getOpenconfigVersion() {
68 return Module.DEFAULT_OPENCONFIG_VERSION;