fe230e898fd7e0b0096c84706fe7d5eb82036bc8
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / DataSchemaNodeBuilder.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.parser.builder.api;
9
10 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
11
12 /**
13  * Interface for all yang data-schema nodes [anyxml, case, container, grouping,
14  * list, module, notification].
15  */
16 public interface DataSchemaNodeBuilder extends SchemaNodeBuilder, GroupingMember {
17
18     /**
19      * Get original builder definition from grouping, where it is defined.
20      *
21      * @return original builder definition from grouping if this node is added
22      *         by uses, null otherwise
23      */
24     SchemaNodeBuilder getOriginal();
25
26     /**
27      * Set original builder definition from grouping
28      *
29      * @param original
30      *            original builder definition from grouping
31      */
32     void setOriginal(SchemaNodeBuilder original);
33
34     /**
35      *
36      * Returns true if product of this builder is added by augmentation.
37      *
38      * @return true, if this node is added by augmentation, false otherwise
39      */
40     boolean isAugmenting();
41
42     /**
43      * Set if the product of the builder node is introduced by augmentation.
44      *
45      * @param augmenting information about augmentation
46      */
47     void setAugmenting(boolean augmenting);
48
49     /**
50      * Get value of config statement.
51      *
52      * @return value of config statement
53      */
54     boolean isConfiguration();
55
56     /**
57      * Set config statement to the product.
58      *
59      *
60      * @param config true if config true was set, false if config false was set.
61      */
62     void setConfiguration(boolean config);
63
64     /**
65      * Get constraints of this builder.
66      *
67      * @return constraints of this builder
68      */
69     ConstraintsBuilder getConstraints();
70
71     /**
72      * Build DataSchemaNode object from this builder.
73      *
74      * @return instance of {@link DataSchemaNode} based on the state present in this builder.
75      */
76     @Override
77     DataSchemaNode build();
78
79 }