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