BUG-868: add deprecation hint
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / CompositeNode.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.data.api;
9
10 import java.util.List;
11 import java.util.Map;
12
13 import org.opendaylight.yangtools.yang.common.QName;
14
15 /**
16  * Composite node represents a branch in the data tree, which could contain
17  * nested composite nodes or leaf nodes. In the terms of the XML the simple node
18  * is element which does not text data directly (CDATA or PCDATA), only other
19  * nodes. The composite node is the manifestation of the following data schema
20  * constructs in the YANG:
21  *
22  * <ul>
23  * <li><b>container</b> - the composite node represents the YANG container and
24  * could contain all children schema nodes of that container</li>
25  * <li><b>item</b> in the <b>list</b> - the composite node represents one item
26  * in the YANG list and could contain all children schema nodes of that list
27  * item.</li>
28  * <li><b>anyxml</b></li>
29  * </ul>
30  *
31  *
32  */
33 public interface CompositeNode extends //
34     Node<List<Node<?>>>, //
35     NodeModification, //
36     Map<QName,List<Node<?>>> {
37
38     /**
39      * Returns a list of children as seens in resulting XML serialization
40      * defined by YANG specification.
41      *
42      * @return
43      *
44      * @deprecated Use {@link #getValue()} instead.
45      */
46     @Deprecated
47     List<Node<?>> getChildren();
48
49     List<CompositeNode> getCompositesByName(QName children);
50
51     List<CompositeNode> getCompositesByName(String children);
52
53     List<SimpleNode<?>> getSimpleNodesByName(QName children);
54
55     List<SimpleNode<?>> getSimpleNodesByName(String children);
56
57     CompositeNode getFirstCompositeByName(QName container);
58
59     SimpleNode<?> getFirstSimpleByName(QName leaf);
60
61     /**
62      * @return cast self to mutable, if possible
63      */
64     @Deprecated
65     MutableCompositeNode asMutable();
66
67 }