Added getParent() method to DataSchemaNode and DataNodeContainer. Fixed Bugs.
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / AugmentationSchemaBuilder.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.AugmentationSchema;
11 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
12 import org.opendaylight.yangtools.yang.model.api.Status;
13 import org.opendaylight.yangtools.yang.model.api.YangNode;
14
15 /**
16  * Interface for builders of 'augment' statement.
17  */
18 public interface AugmentationSchemaBuilder extends DataNodeContainerBuilder {
19
20     String getWhenCondition();
21
22     void addWhenCondition(String whenCondition);
23
24     String getDescription();
25
26     void setDescription(String description);
27
28     String getReference();
29
30     void setReference(String reference);
31
32     Status getStatus();
33
34     void setStatus(Status status);
35
36     /**
37      * Get path to target node as single string.
38      *
39      * @return path to target node as String
40      */
41     String getTargetPathAsString();
42
43     /**
44      * Get path to target node.
45      * <p>
46      * Note that individual parts of path contain only prefix relative to
47      * current context and name of node.
48      * </p>
49      *
50      * @return path to target node as SchemaPath
51      */
52     SchemaPath getTargetPath();
53
54     /**
55      * Get schema path of target node.
56      *
57      * @return SchemaPath of target node
58      */
59     SchemaPath getTargetNodeSchemaPath();
60
61     /**
62      * Set schema path of target node.
63      *
64      * @param path
65      *            SchemaPath of target node
66      */
67     void setTargetNodeSchemaPath(SchemaPath path);
68
69     AugmentationSchema build(YangNode parent);
70
71     /**
72      * Get information about augmentation process.
73      *
74      * @return true, if augmentation process was performed already, false
75      *         otherwise
76      */
77     boolean isResolved();
78
79     /**
80      * Set information about augmentation process.
81      *
82      * @param resolved
83      */
84     void setResolved(boolean resolved);
85
86 }