YANG model design to define data node for usage in YANG store and YANG runtime

Change-Id: I38cb20716fb03067f875b8a8f1ce44c94673ebdf
diff --git a/model/pom.xml b/model/pom.xml
new file mode 100644
index 0000000..02789b3
--- /dev/null
+++ b/model/pom.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2016-present Open Networking Laboratory
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onosproject</groupId>
+        <artifactId>onos-yang-utils</artifactId>
+        <version>1.10-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>onos-yang-model</artifactId>
+    <version>1.10-SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.7.21</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>3.0.2</version>
+                <configuration>
+                    <skipIfEmpty>true</skipIfEmpty>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>default</id>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/model/src/main/java/org/onosproject/yang/model/DataNode.java b/model/src/main/java/org/onosproject/yang/model/DataNode.java
new file mode 100644
index 0000000..257b5de
--- /dev/null
+++ b/model/src/main/java/org/onosproject/yang/model/DataNode.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yang.model;
+
+/**
+ * Abstraction of an entity which represents data tree node. Information
+ * exchange between YANG runtime, protocol and store will be based on this
+ * node, agnostic of schema.
+ */
+public interface DataNode {
+
+    /**
+     * Returns the node schema identifier.
+     *
+     * @return node schema identifier
+     */
+    SchemaIdentifier identifier();
+
+    /**
+     * Returns the type of node.
+     *
+     * @return node type
+     */
+    Type type();
+
+    /**
+     * Returns the key to identify a branching node.
+     *
+     * @return key to identify a branching node
+     */
+    NodeKey key();
+
+    /**
+     * Represents type of node in data store.
+     */
+    enum Type {
+
+        /**
+         * Single instance node.
+         */
+        SINGLE_INSTANCE_NODE,
+
+        /**
+         * Multi instance node.
+         */
+        MULTI_INSTANCE_NODE,
+
+        /**
+         * Single instance leaf node.
+         */
+        SINGLE_INSTANCE_LEAF_VALUE_NODE,
+
+        /**
+         * Multi instance leaf node.
+         */
+        MULTI_INSTANCE_LEAF_VALUE_NODE
+    }
+}
diff --git a/model/src/main/java/org/onosproject/yang/model/InnerNode.java b/model/src/main/java/org/onosproject/yang/model/InnerNode.java
new file mode 100644
index 0000000..c4db08f
--- /dev/null
+++ b/model/src/main/java/org/onosproject/yang/model/InnerNode.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.onosproject.yang.model;
+
+import java.util.LinkedHashMap;
+
+/**
+ * Abstraction of an entity which represents an inner node in data store.
+ */
+public interface InnerNode extends DataNode {
+
+    /**
+     * Returns the children nodes to the current node.
+     * <p>
+     * Children nodes are identified based on the node key
+     *
+     * @return read only linked map of children nodes
+     */
+    LinkedHashMap<NodeKey, DataNode> childNodes();
+
+}
diff --git a/runtime/src/main/java/org/onosproject/yang/LeafDataNode.java b/model/src/main/java/org/onosproject/yang/model/LeafNode.java
similarity index 61%
copy from runtime/src/main/java/org/onosproject/yang/LeafDataNode.java
copy to model/src/main/java/org/onosproject/yang/model/LeafNode.java
index 69b1bb0..e6af9d2 100644
--- a/runtime/src/main/java/org/onosproject/yang/LeafDataNode.java
+++ b/model/src/main/java/org/onosproject/yang/model/LeafNode.java
@@ -14,14 +14,26 @@
  * limitations under the License.
  */
 
-package org.onosproject.yang;
+
+package org.onosproject.yang.model;
 
 /**
- * Representation of a leaf data node capable of holding a value.
+ * Abstraction of an entity which represents leaf data tree node.
  */
-public interface LeafDataNode extends DataNode {
+public interface LeafNode extends DataNode {
 
-    // String, Number or Boolean primitive values
+    /**
+     * Returns value contained in leaf node.
+     *
+     * @return value contained in leaf node
+     */
     Object value();
 
+    /**
+     * Returns value as string, for usage in serializers.
+     *
+     * @return string representation of value
+     */
+    String asString();
+
 }
diff --git a/model/src/main/java/org/onosproject/yang/model/MultiInstanceLeafKey.java b/model/src/main/java/org/onosproject/yang/model/MultiInstanceLeafKey.java
new file mode 100644
index 0000000..8be8bbe
--- /dev/null
+++ b/model/src/main/java/org/onosproject/yang/model/MultiInstanceLeafKey.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yang.model;
+
+/**
+ * Abstraction of an entity which identifies a uniquely branching leaf
+ * corresponding to a multi instance leaf schema.
+ */
+public interface MultiInstanceLeafKey extends NodeKey {
+
+    /**
+     * Returns value of node, this is only valid for multi-instance leaf, node.
+     *
+     * @return value maintained in the node
+     */
+    Object value();
+
+    /**
+     * Returns value as string, for usage in serializers.
+     *
+     * @return string representation of value
+     */
+    String asString();
+}
diff --git a/model/src/main/java/org/onosproject/yang/model/MultiInstanceNodeKey.java b/model/src/main/java/org/onosproject/yang/model/MultiInstanceNodeKey.java
new file mode 100644
index 0000000..5677891
--- /dev/null
+++ b/model/src/main/java/org/onosproject/yang/model/MultiInstanceNodeKey.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.onosproject.yang.model;
+
+import java.util.List;
+
+/**
+ * Abstraction of an entity which identifies a unique branching node
+ * corresponding to a multi instance schema definition.
+ */
+public interface MultiInstanceNodeKey extends NodeKey {
+
+    /**
+     * Returns the list of key leaf nodes of a multi instance node, which
+     * uniquely identifies the branching node entry corresponding to a multi
+     * instance schema definition.
+     *
+     * @return List of key leaf nodes
+     */
+    List<LeafNode> keyLeafs();
+}
diff --git a/runtime/src/main/java/org/onosproject/yang/ContainerDataNode.java b/model/src/main/java/org/onosproject/yang/model/NodeKey.java
similarity index 62%
rename from runtime/src/main/java/org/onosproject/yang/ContainerDataNode.java
rename to model/src/main/java/org/onosproject/yang/model/NodeKey.java
index 16d8e42..1f6dbfe 100644
--- a/runtime/src/main/java/org/onosproject/yang/ContainerDataNode.java
+++ b/model/src/main/java/org/onosproject/yang/model/NodeKey.java
@@ -14,19 +14,20 @@
  * limitations under the License.
  */
 
-package org.onosproject.yang;
 
-import java.util.List;
+package org.onosproject.yang.model;
 
 /**
- * Representation of a container data node capable of containing children nodes.
+ * Abstraction of an entity which identifies a node uniquely among its
+ * siblings.
  */
-public interface ContainerDataNode extends DataNode {
+public interface NodeKey extends Comparable<NodeKey> {
 
-    // List of children
-    List<DataNode> children();
-
-    // Child with specific identifier
-    DataNode child(String identifier); // TODO: Use NodeIdentifier instead of String
-
+    /**
+     * Returns the schema identifier as minimal key required to identify a
+     * branching node.
+     *
+     * @return schema identifier of a key
+     */
+    SchemaIdentifier identifier();
 }
diff --git a/model/src/main/java/org/onosproject/yang/model/ResourceIdentifier.java b/model/src/main/java/org/onosproject/yang/model/ResourceIdentifier.java
new file mode 100644
index 0000000..fb40c48
--- /dev/null
+++ b/model/src/main/java/org/onosproject/yang/model/ResourceIdentifier.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yang.model;
+
+/**
+ * Abstraction of an entity which identifies a resource in the logical tree
+ * data store. It is a recursive approach to locate a resource in the
+ * instance tree.
+ */
+
+ /*-- Assume the below schema
+ * container node1{
+ *     list node2{
+ *         key node3;
+ *         leaf node3{
+ *             type string;
+ *         }
+ *         leaf-list node4{
+ *             type string
+ *         }
+ *     }
+ * }
+ * Assume an instance tree as below
+ * node1
+ * |----node2
+ * |    |----node3
+ * |    |    |----"val1"
+ * |    |----node4
+ * |    |    |----"val2"
+ * |    |    |----"val3"
+ * |----node2
+ * |    |----node3
+ * |    |    |----"val4"
+ * |    |----node4
+ * |    |    |----"val5"
+ * |    |    |----"val6"
+ * <p>
+ *
+ * Assume a resource identifier variable a is pointing to node4 with val3,
+ * then its value is as follows
+ *
+ *      //identifies node1
+ *      NodeKey containerKey = a.nodeKey();
+ *      SchemaIdentifier schemaId = containerKey.identifier();//"node1"
+ *
+ *      //identifies a specific entry of list node2
+ *      MultiInstanceNodeKey listKey;
+ *      listKey = (MultiInstanceNodeKey) a.descendentIdentifier().nodeKey();
+ *      schemaId = listKey.identifier();//"node2"
+ *      List<LeafNode> keyLeaves = listKey.keyLeafs();
+ *      LeafNode key = keyLeaves.get(0);
+ *      schemaId = key.identifier();//"node3"
+ *      String keyVal = key.asString();//"val1"
+ *
+ *      //identifiers a specific entry of leaf-list node4
+ *      MultiInstanceLeafKey leafKey;
+ *      leafKey = (MultiInstanceLeafKey) a.descendentIdentifier().
+ *              descendentIdentifier().nodeKey();
+ *      schemaId = leafKey.identifier();//"node4"
+ *      keyVal = leafKey.asString();//val3
+ *
+ *      ResourceIdentifier termination = a.descendentIdentifier().descendentIdentifier().
+ *              descendentIdentifier(); //null
+ *
+ */
+public interface ResourceIdentifier {
+    /**
+     * Returns the node key used to uniquely identify the branch in the
+     * logical tree.
+     *
+     * @return node key uniquely identifying the branch
+     */
+    NodeKey nodeKey();
+
+    /**
+     * Returns the descendent resource identifier.
+     *
+     * @return descendent resource identifier
+     */
+    ResourceIdentifier descendentIdentifier();
+}
diff --git a/model/src/main/java/org/onosproject/yang/model/SchemaIdentifier.java b/model/src/main/java/org/onosproject/yang/model/SchemaIdentifier.java
new file mode 100644
index 0000000..a180afb
--- /dev/null
+++ b/model/src/main/java/org/onosproject/yang/model/SchemaIdentifier.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yang.model;
+
+/**
+ * Abstraction of an entity which identifies a schema node in the schema / data
+ * tree.
+ */
+public interface SchemaIdentifier {
+    /**
+     * Returns node schema name. This is mandatory to identify node according
+     * to schema.
+     *
+     * @return node name
+     */
+    String name();
+
+    /**
+     * Returns node's namespace. This is mandatory serializers must translate
+     * any implicit namespace to explicit namespace.
+     *
+     * @return node's namespace
+     */
+    String namespace();
+}
diff --git a/runtime/src/main/java/org/onosproject/yang/LeafDataNode.java b/model/src/main/java/org/onosproject/yang/model/package-info.java
similarity index 73%
rename from runtime/src/main/java/org/onosproject/yang/LeafDataNode.java
rename to model/src/main/java/org/onosproject/yang/model/package-info.java
index 69b1bb0..dcd19fe 100644
--- a/runtime/src/main/java/org/onosproject/yang/LeafDataNode.java
+++ b/model/src/main/java/org/onosproject/yang/model/package-info.java
@@ -14,14 +14,9 @@
  * limitations under the License.
  */
 
-package org.onosproject.yang;
-
 /**
- * Representation of a leaf data node capable of holding a value.
+ * Core of hierarchical data organization. Supports traversal of tree data
+ * while being agnostic of specific schemas.
+ * Supports database operation on logical hierarchical data store.
  */
-public interface LeafDataNode extends DataNode {
-
-    // String, Number or Boolean primitive values
-    Object value();
-
-}
+package org.onosproject.yang.model;
diff --git a/parser/src/main/resources/YangLexer.tokens b/parser/src/main/resources/YangLexer.tokens
new file mode 100644
index 0000000..6111f71
--- /dev/null
+++ b/parser/src/main/resources/YangLexer.tokens
@@ -0,0 +1,192 @@
+ANYXML_KEYWORD=1
+ARGUMENT_KEYWORD=2
+AUGMENT_KEYWORD=3
+BASE_KEYWORD=4
+BELONGS_TO_KEYWORD=5
+BIT_KEYWORD=6
+CASE_KEYWORD=7
+CHOICE_KEYWORD=8
+CONFIG_KEYWORD=9
+CONTACT_KEYWORD=10
+CONTAINER_KEYWORD=11
+DEFAULT_KEYWORD=12
+DESCRIPTION_KEYWORD=13
+ENUM_KEYWORD=14
+ERROR_APP_TAG_KEYWORD=15
+ERROR_MESSAGE_KEYWORD=16
+EXTENSION_KEYWORD=17
+DEVIATION_KEYWORD=18
+DEVIATE_KEYWORD=19
+FEATURE_KEYWORD=20
+FRACTION_DIGITS_KEYWORD=21
+GROUPING_KEYWORD=22
+IDENTITY_KEYWORD=23
+IF_FEATURE_KEYWORD=24
+IMPORT_KEYWORD=25
+INCLUDE_KEYWORD=26
+INPUT_KEYWORD=27
+KEY_KEYWORD=28
+LEAF_KEYWORD=29
+LEAF_LIST_KEYWORD=30
+LENGTH_KEYWORD=31
+LIST_KEYWORD=32
+MANDATORY_KEYWORD=33
+MAX_ELEMENTS_KEYWORD=34
+MIN_ELEMENTS_KEYWORD=35
+MODULE_KEYWORD=36
+MUST_KEYWORD=37
+NAMESPACE_KEYWORD=38
+NOTIFICATION_KEYWORD=39
+ORDERED_BY_KEYWORD=40
+ORGANIZATION_KEYWORD=41
+OUTPUT_KEYWORD=42
+PATH_KEYWORD=43
+PATTERN_KEYWORD=44
+POSITION_KEYWORD=45
+PREFIX_KEYWORD=46
+PRESENCE_KEYWORD=47
+RANGE_KEYWORD=48
+REFERENCE_KEYWORD=49
+REFINE_KEYWORD=50
+REQUIRE_INSTANCE_KEYWORD=51
+REVISION_KEYWORD=52
+REVISION_DATE_KEYWORD=53
+RPC_KEYWORD=54
+STATUS_KEYWORD=55
+SUBMODULE_KEYWORD=56
+TYPE_KEYWORD=57
+TYPEDEF_KEYWORD=58
+UNIQUE_KEYWORD=59
+UNITS_KEYWORD=60
+USES_KEYWORD=61
+VALUE_KEYWORD=62
+WHEN_KEYWORD=63
+YANG_VERSION_KEYWORD=64
+YIN_ELEMENT_KEYWORD=65
+ADD_KEYWORD=66
+CURRENT_KEYWORD=67
+DELETE_KEYWORD=68
+DEPRECATED_KEYWORD=69
+FALSE_KEYWORD=70
+MAX_KEYWORD=71
+MIN_KEYWORD=72
+NOT_SUPPORTED_KEYWORD=73
+OBSOLETE_KEYWORD=74
+REPLACE_KEYWORD=75
+SYSTEM_KEYWORD=76
+TRUE_KEYWORD=77
+UNBOUNDED_KEYWORD=78
+USER_KEYWORD=79
+COMPILER_ANNOTATION_KEYWORD=80
+COMPILER_ANNOTATION=81
+APP_DATA_STRUCTURE_KEYWORD=82
+APP_DATA_STRUCTURE=83
+DATA_STRUCTURE_KEYWORD=84
+DATA_STRUCTURE=85
+DATA_STRUCTURE_KEY=86
+APP_EXTENDED_KEYWORD=87
+APP_EXTENDED=88
+COMMENT=89
+WS=90
+LINE_COMMENT=91
+INTEGER=92
+DATE_ARG=93
+LEFT_CURLY_BRACE=94
+RIGHT_CURLY_BRACE=95
+IDENTIFIER=96
+STMTEND=97
+DQUOTE=98
+COLON=99
+PLUS=100
+MINUS=101
+STRING=102
+'anyxml'=1
+'argument'=2
+'augment'=3
+'base'=4
+'belongs-to'=5
+'bit'=6
+'case'=7
+'choice'=8
+'config'=9
+'contact'=10
+'container'=11
+'default'=12
+'description'=13
+'enum'=14
+'error-app-tag'=15
+'error-message'=16
+'extension'=17
+'deviation'=18
+'deviate'=19
+'feature'=20
+'fraction-digits'=21
+'grouping'=22
+'identity'=23
+'if-feature'=24
+'import'=25
+'include'=26
+'input'=27
+'key'=28
+'leaf'=29
+'leaf-list'=30
+'length'=31
+'list'=32
+'mandatory'=33
+'max-elements'=34
+'min-elements'=35
+'module'=36
+'must'=37
+'namespace'=38
+'notification'=39
+'ordered-by'=40
+'organization'=41
+'output'=42
+'path'=43
+'pattern'=44
+'position'=45
+'prefix'=46
+'presence'=47
+'range'=48
+'reference'=49
+'refine'=50
+'require-instance'=51
+'revision'=52
+'revision-date'=53
+'rpc'=54
+'status'=55
+'submodule'=56
+'type'=57
+'typedef'=58
+'unique'=59
+'units'=60
+'uses'=61
+'value'=62
+'when'=63
+'yang-version'=64
+'yin-element'=65
+'add'=66
+'current'=67
+'delete'=68
+'deprecated'=69
+'false'=70
+'max'=71
+'min'=72
+'not-supported'=73
+'obsolete'=74
+'replace'=75
+'system'=76
+'true'=77
+'unbounded'=78
+'user'=79
+'compiler-annotation'=80
+'app-data-structure'=82
+'data-structure'=84
+'app-extended-name'=87
+'{'=94
+'}'=95
+';'=97
+'"'=98
+':'=99
+'+'=100
+'-'=101
diff --git a/pom.xml b/pom.xml
index b571eea..07dc848 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,6 +38,7 @@
         <module>generator</module>
         <module>parser</module>
         <module>plugin</module>
+        <module>model</module>
         <module>runtime</module>
     </modules>
 
diff --git a/runtime/pom.xml b/runtime/pom.xml
index 9398f49..f5183ce 100644
--- a/runtime/pom.xml
+++ b/runtime/pom.xml
@@ -31,7 +31,7 @@
     <dependencies>
         <dependency>
             <groupId>org.onosproject</groupId>
-            <artifactId>onos-yang-datamodel</artifactId>
+            <artifactId>onos-yang-model</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
diff --git a/runtime/src/main/java/org/onosproject/yang/DataNode.java b/runtime/src/main/java/org/onosproject/yang/DataNode.java
deleted file mode 100644
index 97ce1c6..0000000
--- a/runtime/src/main/java/org/onosproject/yang/DataNode.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2016-present Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onosproject.yang;
-
-/**
- * Representation of a configuration data node capable of either carrying data
- * or conveying the configuration tree structure.
- */
-public interface DataNode {
-
-    // TODO: specify generic nature of holding data and/or tree structure
-    // TODO: determine whether there should be subclasses for leaf, container, etc.
-    // identifier
-    // type
-    // no parent!
-
-}
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/YangRuntimeService.java b/runtime/src/main/java/org/onosproject/yang/runtime/YangRuntimeService.java
index 6c69507..4b9599a 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/YangRuntimeService.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/YangRuntimeService.java
@@ -16,7 +16,7 @@
 
 package org.onosproject.yang.runtime;
 
-import org.onosproject.yang.DataNode;
+import org.onosproject.yang.model.DataNode;
 
 import java.io.InputStream;
 
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/YangSerializer.java b/runtime/src/main/java/org/onosproject/yang/runtime/YangSerializer.java
index 0ce4308..e6cf197 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/YangSerializer.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/YangSerializer.java
@@ -16,7 +16,7 @@
 
 package org.onosproject.yang.runtime;
 
-import org.onosproject.yang.DataNode;
+import org.onosproject.yang.model.DataNode;
 
 import java.io.InputStream;