When a node is going down, remove edges in both directions associated with the node.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / main / java / org / opendaylight / controller / yang / parser / builder / api / TypeAwareBuilder.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.controller.yang.parser.builder.api;
9
10 import org.opendaylight.controller.yang.common.QName;
11 import org.opendaylight.controller.yang.model.api.SchemaPath;
12 import org.opendaylight.controller.yang.model.api.TypeDefinition;
13
14 /**
15  * Builders of all nodes, which can have 'type' statement must implement this
16  * interface. [typedef, type, leaf, leaf-list, deviate]
17  */
18 public interface TypeAwareBuilder extends Builder {
19
20     /**
21      * Get qname of this node.
22      *
23      * @return QName of this node
24      */
25     QName getQName();
26
27     /**
28      * Get schema path of this node.
29      *
30      * @return SchemaPath of this node
31      */
32     SchemaPath getPath();
33
34     /**
35      * Get resolved type of this node.
36      *
37      * @return type of this node if it is already resolved, null otherwise
38      */
39     TypeDefinition<?> getType();
40
41     /**
42      * Get builder of type of this node.
43      *
44      * @return builder of type of this node or null of this builder has already
45      *         resolved type
46      */
47     TypeDefinitionBuilder getTypedef();
48
49     /**
50      * Set resolved type to this node.
51      *
52      * @param type
53      *            type to set
54      */
55     void setType(TypeDefinition<?> type);
56
57     /**
58      * Set builder of type to this node.
59      *
60      * @param typedef
61      *            builder of type to set
62      */
63     void setTypedef(TypeDefinitionBuilder typedef);
64
65 }