8b15c979a276d1b8819b342c4152abb17a5da23d
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / DataNodeContainer.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 package org.opendaylight.yangtools.yang.model.api;
9
10 import java.util.Collection;
11 import java.util.Set;
12
13 import org.opendaylight.yangtools.yang.common.QName;
14
15 /**
16  * Node which can contains other nodes.
17  */
18 public interface DataNodeContainer {
19
20     /**
21      * Returns set of all newly defined types within this DataNodeContainer.
22      *
23      * @return typedef statements in lexicographical order
24      */
25     Set<TypeDefinition<?>> getTypeDefinitions();
26
27     /**
28      * Returns set of all child nodes defined within this DataNodeContainer.
29      * Although the return type is a collection, each node is guaranteed to
30      * be present at most once.
31      *
32      * @return child nodes in lexicographical order
33      */
34     Collection<DataSchemaNode> getChildNodes();
35
36     /**
37      * Returns set of all groupings defined within this DataNodeContainer.
38      *
39      * @return grouping statements in lexicographical order
40      */
41     Set<GroupingDefinition> getGroupings();
42
43     /**
44      * @param name
45      *            QName of seeked child
46      * @return child node of this DataNodeContainer if child with given name is
47      *         present, null otherwise
48      */
49     DataSchemaNode getDataChildByName(QName name);
50
51     /**
52      * @param name
53      *            name of seeked child as String
54      * @return child node of this DataNodeContainer if child with given name is
55      *         present, null otherwise
56      */
57     DataSchemaNode getDataChildByName(String name);
58
59     /**
60      * @return Set of all uses nodes defined within this DataNodeContainer
61      */
62     Set<UsesNode> getUses();
63
64 }