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