BUG-1270: introduce getQNameModule()
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / ModuleIdentifier.java
1 /*
2  * Copyright (c) 2013 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
9 package org.opendaylight.yangtools.yang.model.api;
10
11 import java.net.URI;
12 import java.util.Date;
13
14 import org.opendaylight.yangtools.yang.common.QNameModule;
15
16
17 public interface ModuleIdentifier {
18     /**
19      * Returns a {@link QNameModule}, which contains the namespace and
20      * the revision of the module.
21      *
22      * @return QNameModule identifier.
23      */
24     QNameModule getQNameModule();
25
26     /**
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
29      *
30      * @return string with the name of the module
31      */
32     String getName();
33
34     /**
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()}.
39      *
40      * @return URI format of the namespace of the module
41      */
42     URI getNamespace();
43
44     /**
45      * Returns the revision date for the module. If you need both namespace and
46      * revision, please consider using {@link #getQNameModule()}.
47      *
48      * @return date of the module revision which is specified as argument of
49      *         YANG {@link Module <b><font color="#339900">revison</font></b>}
50      *         keyword
51      */
52     Date getRevision();
53 }