Initial opendaylight infrastructure commit!!
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-data-util / src / main / java / org / opendaylight / controller / data / util / AbstractNode.java
1 /*\r
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.controller.data.util;\r
9 \r
10 import org.opendaylight.controller.yang.common.QName;\r
11 import org.opendaylight.controller.yang.data.api.CompositeNode;\r
12 import org.opendaylight.controller.yang.data.api.Node;\r
13 \r
14 public abstract class AbstractNode<T> implements Node<T> {\r
15 \r
16     private final QName nodeName;\r
17     private final CompositeNode parent;\r
18 \r
19     protected AbstractNode(QName name, CompositeNode parent) {\r
20         nodeName = name;\r
21         this.parent = parent;\r
22     }\r
23 \r
24     public QName getNodeType() {\r
25         return this.nodeName;\r
26     }\r
27 \r
28     public CompositeNode getParent() {\r
29         return parent;\r
30     }\r
31 }\r