Bug 4662: Introduce a SemanticVersion concept - pre-linkage phase
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / spi / source / QNameToStatementDefinition.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.parser.spi.source;
9
10 import java.net.URI;
11 import javax.annotation.Nonnull;
12 import javax.annotation.Nullable;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
15 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
16
17 /**
18  *
19  * Map of fully qualified statement name to statement definition.
20  *
21  */
22 public interface QNameToStatementDefinition extends IdentifierNamespace<QName, StatementDefinition> {
23
24     /**
25      * Returns StatementDefinition with specified QName.
26      *
27      * @param identifier
28      *            QName of requested statement
29      * @return StatementDefinition
30      */
31     @Nullable
32     StatementDefinition get(@Nonnull QName identifier);
33
34     /**
35      * Returns StatementDefinition with specified namespace and localName.
36      *
37      * @param namespace
38      *            namespace of requested statement
39      * @param localName
40      *            localName of requested statement
41      * @return StatementDefinition
42      */
43     @Nullable
44     StatementDefinition getByNamespaceAndLocalName(@Nonnull final URI namespace, @Nonnull final String localName);
45 }