Merge from development repository. 71/71/2
authorTony Tkacik <ttkacik@cisco.com>
Mon, 25 Mar 2013 13:25:07 +0000 (14:25 +0100)
committerTony Tkacik <ttkacik@cisco.com>
Mon, 25 Mar 2013 14:56:50 +0000 (15:56 +0100)
See commit log bellow for more details.

    commit d3f7ff74377f55c106ca28a43c936ef4d3bcb5e2
    Author: mvitez <mvitez@cisco.com>
    Date:   Mon Mar 25 10:15:36 2013 +0100

        improve some code

    commit a0bec74e277e7afcc0f6867ba2d7527d4e25db60
    Author: mvitez <mvitez@cisco.com>
    Date:   Mon Mar 25 09:26:59 2013 +0100

        added typedef and augment resolving, added tests

    commit 32fff33187321463bb27b5c11b63a71d8dbc104e
    Merge: 562dbeb e6b3057
    Author: lsedlak <lsedlak@cisco.com>
    Date:   Fri Mar 22 15:27:59 2013 +0100

        Merge branch 'binding-api'

    commit e6b30574b2598c289ea90be6588151dc7cb7b0fa
    Author: lsedlak <lsedlak@cisco.com>
    Date:   Fri Mar 22 15:16:12 2013 +0100

        Added Implementation of getPathStatement into Identityref.java;

    commit ef70678b2127fd56d062d99a20a02de401262b29
    Author: lsedlak <lsedlak@cisco.com>
    Date:   Fri Mar 22 15:14:28 2013 +0100

        Added RevisionAwareXPath into interface definition;

    commit 78cb3c64716f7cf2788dfaf61906a07481bcd9df
    Author: mvitez <mvitez@cisco.com>
    Date:   Fri Mar 22 13:40:05 2013 +0100

        added implementation of SchemaContext

    commit 45769c7721eb9832cd43c04a020f1ca7f52172ef
    Author: lsedlak <lsedlak@cisco.com>
    Date:   Fri Mar 22 13:55:26 2013 +0100

        Changed parameter in generateTypes from Module to SchemaContext;
        Implemented changes in generatedTypes in BindingGeneratorImpl.java;
        Implemented changes in GeneratedTypesTest.java;

    commit 562dbebbbbfec341c98885ad80b87f3d8d05c3f7
    Author: mvitez <mvitez@cisco.com>
    Date:   Fri Mar 22 13:40:05 2013 +0100

        added implementation of SchemaContext

    commit c4ea91257946fa1f3cd44a148af7a44e254b661f
    Author: lsedlak <lsedlak@cisco.com>
    Date:   Fri Mar 22 11:09:50 2013 +0100

        Added definition: getExtensions into SchemaContext.java;

    commit 8b239e3fb4a322baa36867d4ce41f2c142a8ef76
    Author: mvitez <mvitez@cisco.com>
    Date:   Fri Mar 22 10:46:27 2013 +0100

        fix Demo, GeneratedTypesTest

    commit 6564270ea304905ccb91718066c7aa65b5430ecb
    Author: mvitez <mvitez@cisco.com>
    Date:   Fri Mar 22 10:33:26 2013 +0100

        rename packages

    commit f3326c65f7de3ce77137b0c972aff32aa5d6f6c6
    Author: mvitez <mvitez@cisco.com>
    Date:   Thu Mar 21 17:45:24 2013 +0100

        renamed YangModelParserImpl-> YangModelParserListenerImpl

    commit 26fa647a676f9c466a010536e9d972486adbb904
    Author: Anton Tkacik <ttkacik@cisco.com>
    Date:   Thu Mar 21 15:49:55 2013 +0100

        Added SAL Binding SPI

    commit e60fb750ef193d8456cb1196b4d13f12f44ad276
    Author: lsedlak <lsedlak@cisco.com>
    Date:   Thu Mar 21 17:27:05 2013 +0100

        Added yang-model-parser-api module into pom definition;

    commit c7023e3f2ae7defeadba319c40011ed4f90bfb4f
    Author: Anton Tkacik <ttkacik@cisco.com>
    Date:   Thu Mar 21 11:22:50 2013 +0100

        Renamed Controller architecture to OpenDayLightController SAL

    commit 985d3e66977876be83db6cba92753ef3ade3edf2
    Merge: 9c9c027 39c8c01
    Author: mvitez <mvitez@cisco.com>
    Date:   Thu Mar 21 15:31:53 2013 +0100

        more progress on yang java model

    commit 9c9c0271a4b7b35177164e94e1677dabecd88ca8
    Author: mvitez <mvitez@cisco.com>
    Date:   Thu Mar 21 13:58:59 2013 +0100

        more progress on yang java model

    commit 5609186d6b22a89f8d0568962bb8d0657818cee4
    Merge: c26cf1d 5adfb70
    Author: mvitez <mvitez@cisco.com>
    Date:   Wed Mar 20 18:14:34 2013 +0100

        getExtensionSchemaNodes changed to getUnknownSchemaNodes;
        Whole package org.opendaylight.controller.model.parser.builder
        refactored accordingly;

    commit 820716ed377f4a7878a1f6373095053eb4ababd0
    Author: mvitez <mvitez@cisco.com>
    Date:   Thu Mar 21 10:04:44 2013 +0100

        added equals, hashCode

    commit c26cf1d917811ab0d5473342d253314f62d6e0a1
    Author: mvitez <mvitez@cisco.com>
    Date:   Wed Mar 20 18:13:56 2013 +0100

        more progress on yang java model

    commit 32e3b9dbef20ab6d8e40d9eded3c452a7f23fdc2
    Author: mvitez <mvitez@cisco.com>
    Date:   Wed Mar 20 15:44:10 2013 +0100

        Changed getLengthConstraint to getLengthConstraints and
        changed return value from LengthConstraint to Set of LengthConstraints;
        Updated BinaryType implementation accordingly;

    commit e8419305c2b7b3197734c8d89d77be25f2d78440
    Author: mvitez <mvitez@cisco.com>
    Date:   Wed Mar 20 15:44:10 2013 +0100

        more progress on yang java model

    commit 6b0283f178366831306456d59431b5747f6c038b
    Author: mvitez <mvitez@cisco.com>
    Date:   Wed Mar 20 12:08:31 2013 +0100

        Added method definitions for RevisionAwareXPath interface;

    commit 463884e9e9e21ff03a3b89b590d0b08d9dd2d9b7
    Author: mvitez <mvitez@cisco.com>
    Date:   Wed Mar 20 12:08:31 2013 +0100

        rework augment parsing

    commit b2fe0c91d7cf184252e2516ad15cdd50e01130a7
    Author: mvitez <mvitez@cisco.com>
    Date:   Tue Mar 19 18:18:28 2013 +0100

        fix test

    commit cd388c2f7fd0460ca068270035ab0acdaa9e5e79
    Author: mvitez <mvitez@cisco.com>
    Date:   Tue Mar 19 18:16:33 2013 +0100

        more progress on yang java model

    commit 638c43548ca83c739131118a404c7b1d454055db
    Merge: 2b0fb2c 36f2f95
    Author: mvitez <mvitez@cisco.com>
    Date:   Tue Mar 19 15:21:27 2013 +0100

        GeneratedType changed to Type in return value of
        generateTypes method;
        Implemented composite key resolving through GeneratedTOBuilder;
        Added test cases for composite key generation;
        Added list-composite-key.yang file for testing purposes;

Change-Id: I9145a87945cc4638ff454f268eb37dd1bf8b3142
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
122 files changed:
opendaylight/sal/yang-prototype/code-generator/binding-generator-api/src/main/java/org/opendaylight/controller/sal/binding/generator/api/BindingGenerator.java
opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/main/java/org/opendaylight/controller/sal/binding/generator/impl/BindingGeneratorImpl.java
opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/test/java/org/opendaylight/controller/sal/binding/yang/types/test/GeneratedTypesTest.java
opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/test/resources/list-composite-key.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/binding-java-api-generator/src/test/java/org/opendaylight/controller/sal/java/api/generator/test/GeneratorJavaFileTest.java
opendaylight/sal/yang-prototype/code-generator/binding-model-api/src/main/java/org/opendaylight/controller/sal/binding/model/api/type/builder/MethodSignatureBuilder.java
opendaylight/sal/yang-prototype/code-generator/binding-model-api/src/main/java/org/opendaylight/controller/sal/binding/model/api/type/builder/package-info.java
opendaylight/sal/yang-prototype/code-generator/code-generator-demo/pom.xml
opendaylight/sal/yang-prototype/code-generator/code-generator-demo/src/main/java/org/opendaylight/controller/Demo.java
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-api/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-api/src/main/java/org/opendaylight/controller/yang/model/parser/api/YangModelParser.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-api/src/main/java/org/opendaylight/controller/yang/model/parser/api/package-info.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/pom.xml
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/antlrv4/code/gen/YangLexer.java
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/antlrv4/code/gen/YangParser.java
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/AugmentationSchemaBuilderImpl.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/ContainerSchemaNodeBuilder.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/DeviationBuilder.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/FeatureBuilder.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/GroupingBuilderImpl.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/LeafListSchemaNodeBuilder.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/LeafSchemaNodeBuilder.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/ListSchemaNodeBuilder.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/ModuleBuilder.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/MustDefinitionBuilder.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/NotificationBuilder.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/TypedefBuilder.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/UsesNodeBuilderImpl.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/YangModelBuilder.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/util/YangModelBuilderHelper.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/AbstractChildNodeBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/AbstractChildNodeBuilder.java with 92% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/AugmentationSchemaBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/AugmentationSchemaBuilder.java with 82% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/AugmentationTargetBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/AugmentationTargetBuilder.java with 89% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/Builder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/Builder.java with 86% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/ChildNodeBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/ChildNodeBuilder.java with 85% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/DataSchemaNodeBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/DataSchemaNodeBuilder.java with 58% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/GroupingBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/GroupingBuilder.java with 88% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/SchemaNodeBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/SchemaNodeBuilder.java with 90% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/TypeAwareBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/TypeAwareBuilder.java with 89% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/TypeDefinitionAwareBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/TypeDefinitionAwareBuilder.java with 89% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/TypeDefinitionBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/TypeDefinitionBuilder.java with 86% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/api/UsesNodeBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/api/UsesNodeBuilder.java with 75% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/AugmentationSchemaBuilderImpl.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/ConstraintsBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/ContainerSchemaNodeBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/DeviationBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/ExtensionBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/FeatureBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/GroupingBuilderImpl.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/LeafListSchemaNodeBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/LeafSchemaNodeBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/ListSchemaNodeBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/ModuleBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/NotificationBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/RpcDefinitionBuilder.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/RpcDefinitionBuilder.java with 61% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/TypedefBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/UnknownSchemaNodeBuilder.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/builder/impl/UsesNodeBuilderImpl.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/impl/YangModelParserImpl.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/impl/YangModelParserListenerImpl.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/impl/YangModelParserImpl.java with 63% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/yang/model/parser/util/YangModelBuilderUtil.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/model/parser/builder/ContainerSchemaNodeBuilderTest.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/model/parser/builder/LeafListSchemaNodeBuilderTest.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/model/parser/builder/ListSchemaNodeBuilderTest.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/model/parser/impl/YangModelParserTest.java [deleted file]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/yang/model/parser/builder/impl/ContainerSchemaNodeBuilderTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/yang/model/parser/builder/impl/LeafListSchemaNodeBuilderTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/yang/model/parser/builder/impl/LeafSchemaNodeBuilderTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/yang/model/parser/builder/impl/ListSchemaNodeBuilderTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/yang/model/parser/builder/impl/TestUtils.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/model/parser/builder/TestUtils.java with 53% similarity]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/yang/model/parser/builder/impl/YangModelBuilderTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/yang/model/parser/impl/YangModelParserListenerTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/java/org/opendaylight/controller/yang/model/parser/impl/YangModelParserTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/testfile1.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/testfile2.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/test-model.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/pom.xml
opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java
opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareProvider.java
opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/pom.xml
opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/BindingBrokerImpl.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/NotificationInvoker.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/NotificationModule.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/package-info.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/sal-binding-spi/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/Mapper.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/MappingProvider.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/SALBindingModule.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/sal-broker-impl/src/main/java/org/opendaylight/controller/sal/core/impl/ConsumerSessionImpl.java
opendaylight/sal/yang-prototype/sal/sal-broker-impl/src/main/java/org/opendaylight/controller/sal/core/impl/rpc/RpcModule.java
opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/Broker.java
opendaylight/sal/yang-prototype/sal/sal-core-demo/pom.xml
opendaylight/sal/yang-prototype/yang/yang-binding/src/main/java/org/opendaylight/controller/yang/binding/DataObject.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/yang/yang-binding/src/main/java/org/opendaylight/controller/yang/binding/Notification.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/model/api/type/BinaryTypeDefinition.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/model/api/type/IdentityrefTypeDefinition.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/ContainerSchemaNode.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/Deviation.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/LeafListSchemaNode.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/LeafSchemaNode.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/Module.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/RevisionAwareXPath.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/SchemaContext.java [moved from opendaylight/sal/yang-prototype/sal/sal-schema-repository-api/src/main/java/org/opendaylight/controller/sal/schema/api/SchemaContext.java with 61% similarity]
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/SchemaNode.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/Status.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/UnknownSchemaNode.java [moved from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/MustAwareBuilder.java with 51% similarity]
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/UsesNode.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/AbstractInteger.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/BinaryType.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/BitsType.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/BooleanType.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/Decimal64.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/EnumerationType.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/ExtendedType.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/IdentityType.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/Identityref.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/InstanceIdentifier.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/Leafref.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/RevisionAwareXPathImpl.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/StringType.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/UnknownType.java
opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/model/util/YangTypesConverter.java

index 686f364..bed7989 100644 (file)
@@ -9,11 +9,11 @@ package org.opendaylight.controller.sal.binding.generator.api;
 \r
 import java.util.List;\r
 \r
-import org.opendaylight.controller.sal.binding.model.api.GeneratedType;\r
-import org.opendaylight.controller.yang.model.api.Module;\r
+import org.opendaylight.controller.sal.binding.model.api.Type;\r
+import org.opendaylight.controller.yang.model.api.SchemaContext;\r
 \r
 public interface BindingGenerator {\r
 \r
-    public List<GeneratedType> generateTypes(final Module module);\r
+    public List<Type> generateTypes(final SchemaContext context);\r
 \r
 }\r
index d346352..343d9ef 100644 (file)
@@ -8,8 +8,6 @@
 package org.opendaylight.controller.sal.binding.generator.impl;
 
 import java.net.URI;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
@@ -22,8 +20,11 @@ import org.opendaylight.controller.binding.generator.util.CodeGeneratorHelper;
 import org.opendaylight.controller.binding.generator.util.Types;
 import org.opendaylight.controller.sal.binding.generator.api.BindingGenerator;
 import org.opendaylight.controller.sal.binding.generator.spi.TypeProvider;
+import org.opendaylight.controller.sal.binding.model.api.GeneratedTransferObject;
 import org.opendaylight.controller.sal.binding.model.api.GeneratedType;
 import org.opendaylight.controller.sal.binding.model.api.Type;
+import org.opendaylight.controller.sal.binding.model.api.type.builder.GeneratedPropertyBuilder;
+import org.opendaylight.controller.sal.binding.model.api.type.builder.GeneratedTOBuilder;
 import org.opendaylight.controller.sal.binding.model.api.type.builder.GeneratedTypeBuilder;
 import org.opendaylight.controller.sal.binding.model.api.type.builder.MethodSignatureBuilder;
 import org.opendaylight.controller.sal.binding.yang.types.TypeProviderImpl;
@@ -35,15 +36,13 @@ import org.opendaylight.controller.yang.model.api.LeafListSchemaNode;
 import org.opendaylight.controller.yang.model.api.LeafSchemaNode;
 import org.opendaylight.controller.yang.model.api.ListSchemaNode;
 import org.opendaylight.controller.yang.model.api.Module;
+import org.opendaylight.controller.yang.model.api.SchemaContext;
 import org.opendaylight.controller.yang.model.api.SchemaPath;
 import org.opendaylight.controller.yang.model.api.TypeDefinition;
 
 public class BindingGeneratorImpl implements BindingGenerator {
 
-    private static DateFormat simpleDateFormat = new SimpleDateFormat(
-            "yyyy-MM-dd");
     private static Calendar calendar = new GregorianCalendar();
-
     private final Map<String, Map<String, GeneratedTypeBuilder>> genTypeBuilders;
     private final List<ContainerSchemaNode> schemaContainers;
     private final List<ListSchemaNode> schemaLists;
@@ -63,22 +62,30 @@ public class BindingGeneratorImpl implements BindingGenerator {
     }
 
     @Override
-    public List<GeneratedType> generateTypes(final Module module) {
-        final List<GeneratedType> genTypes = new ArrayList<GeneratedType>();
-
-        basePackageName = resolveBasePackageName(module.getNamespace(),
-                module.getYangVersion());
-
-        traverseModule(module);
-        if (schemaContainers.size() > 0) {
-            for (final ContainerSchemaNode container : schemaContainers) {
-                genTypes.add(containerToGenType(container));
-            }
-        }
+    public List<Type> generateTypes(final SchemaContext context) {
+        final List<Type> genTypes = new ArrayList<Type>();
+        
+        if (context != null) {
+            final Set<Module> modules = context.getModules();
+            
+            if (modules != null) {
+                for (final Module module : modules) {
+                    basePackageName = resolveBasePackageName(module.getNamespace(),
+                            module.getYangVersion());
+
+                    traverseModule(module);
+                    if (schemaContainers.size() > 0) {
+                        for (final ContainerSchemaNode container : schemaContainers) {
+                            genTypes.add(containerToGenType(container));
+                        }
+                    }
 
-        if (schemaLists.size() > 0) {
-            for (final ListSchemaNode list : schemaLists) {
-                genTypes.add(listToGenType(list));
+                    if (schemaLists.size() > 0) {
+                        for (final ListSchemaNode list : schemaLists) {
+                            genTypes.addAll(listToGenType(list));
+                        }
+                    }
+                }
             }
         }
 
@@ -113,7 +120,8 @@ public class BindingGeneratorImpl implements BindingGenerator {
 
         for (final DataSchemaNode node : schemaNodes) {
             if (node instanceof LeafSchemaNode) {
-                resolveLeafSchemaNode(typeBuilder, (LeafSchemaNode) node);
+                resolveLeafSchemaNodeAsMethod(typeBuilder,
+                        (LeafSchemaNode) node);
             } else if (node instanceof LeafListSchemaNode) {
                 resolveLeafListSchemaNode(typeBuilder,
                         (LeafListSchemaNode) node);
@@ -128,23 +136,23 @@ public class BindingGeneratorImpl implements BindingGenerator {
         return typeBuilder.toInstance();
     }
 
-    private boolean resolveLeafSchemaNode(
-            final GeneratedTypeBuilder typeBuilder, final LeafSchemaNode node) {
-        if ((node != null) && (typeBuilder != null)) {
-            final String nodeName = node.getQName().getLocalName();
-            String nodeDesc = node.getDescription();
-            if (nodeDesc == null) {
-                nodeDesc = "";
+    private boolean resolveLeafSchemaNodeAsMethod(
+            final GeneratedTypeBuilder typeBuilder, final LeafSchemaNode leaf) {
+        if ((leaf != null) && (typeBuilder != null)) {
+            final String leafName = leaf.getQName().getLocalName();
+            String leafDesc = leaf.getDescription();
+            if (leafDesc == null) {
+                leafDesc = "";
             }
 
-            if (nodeName != null) {
-                final TypeDefinition<?> typeDef = node.getType();
+            if (leafName != null) {
+                final TypeDefinition<?> typeDef = leaf.getType();
                 final Type javaType = typeProvider
                         .javaTypeForSchemaDefinitionType(typeDef);
 
-                constructGetter(typeBuilder, nodeName, nodeDesc, javaType);
-                if (!node.isConfiguration()) {
-                    constructSetter(typeBuilder, nodeName, nodeDesc, javaType);
+                constructGetter(typeBuilder, leafName, leafDesc, javaType);
+                if (!leaf.isConfiguration()) {
+                    constructSetter(typeBuilder, leafName, leafDesc, javaType);
                 }
                 return true;
             }
@@ -152,6 +160,39 @@ public class BindingGeneratorImpl implements BindingGenerator {
         return false;
     }
 
+    private boolean resolveLeafSchemaNodeAsProperty(
+            final GeneratedTOBuilder toBuilder, final LeafSchemaNode leaf,
+            boolean isReadOnly) {
+        if ((leaf != null) && (toBuilder != null)) {
+            final String leafName = leaf.getQName().getLocalName();
+            String leafDesc = leaf.getDescription();
+            if (leafDesc == null) {
+                leafDesc = "";
+            }
+
+            if (leafName != null) {
+                final TypeDefinition<?> typeDef = leaf.getType();
+                final Type javaType = typeProvider
+                        .javaTypeForSchemaDefinitionType(typeDef);
+
+                final GeneratedPropertyBuilder propBuilder = toBuilder
+                        .addProperty(CodeGeneratorHelper
+                                .parseToClassName(leafName));
+
+                propBuilder.setReadOnly(isReadOnly);
+                propBuilder.addReturnType(javaType);
+                propBuilder.addComment(leafDesc);
+
+                toBuilder.addEqualsIdentity(propBuilder);
+                toBuilder.addHashIdentity(propBuilder);
+                toBuilder.addToStringProperty(propBuilder);
+
+                return true;
+            }
+        }
+        return false;
+    }
+
     private boolean resolveLeafListSchemaNode(
             final GeneratedTypeBuilder typeBuilder,
             final LeafListSchemaNode node) {
@@ -316,16 +357,27 @@ public class BindingGeneratorImpl implements BindingGenerator {
         return packageNameBuilder.toString();
     }
 
-    private GeneratedType listToGenType(ListSchemaNode list) {
+    private List<Type> listToGenType(final ListSchemaNode list) {
         if (list == null) {
             return null;
         }
         final GeneratedTypeBuilder typeBuilder = resolveListTypeBuilder(list);
+        final List<String> listKeys = listKeys(list);
+        GeneratedTOBuilder genTOBuilder = null;
+        if (listKeys.size() > 0) {
+            genTOBuilder = resolveListKey(list);
+        }
 
         final Set<DataSchemaNode> schemaNodes = list.getChildNodes();
         for (final DataSchemaNode node : schemaNodes) {
+
             if (node instanceof LeafSchemaNode) {
-                resolveLeafSchemaNode(typeBuilder, (LeafSchemaNode) node);
+                final LeafSchemaNode leaf = (LeafSchemaNode) node;
+                if (!isPartOfListKey(leaf, listKeys)) {
+                    resolveLeafSchemaNodeAsMethod(typeBuilder, leaf);
+                } else {
+                    resolveLeafSchemaNodeAsProperty(genTOBuilder, leaf, true);
+                }
             } else if (node instanceof LeafListSchemaNode) {
                 resolveLeafListSchemaNode(typeBuilder,
                         (LeafListSchemaNode) node);
@@ -336,7 +388,59 @@ public class BindingGeneratorImpl implements BindingGenerator {
                 resolveListSchemaNode(typeBuilder, (ListSchemaNode) node);
             }
         }
-        return typeBuilder.toInstance();
+
+        final List<Type> genTypes = new ArrayList<Type>();
+        if (genTOBuilder != null) {
+            final GeneratedTransferObject genTO = genTOBuilder.toInstance();
+            constructGetter(typeBuilder, genTO.getName(), "Returns Primary Key of Yang List Type", genTO);
+            genTypes.add(genTO);
+        }
+        genTypes.add(typeBuilder.toInstance());
+        return genTypes;
+    }
+
+    /**
+     * @param list
+     * @return
+     */
+    private GeneratedTOBuilder resolveListKey(final ListSchemaNode list) {
+        final String packageName = resolveGeneratedTypePackageName(list
+                .getPath());
+        final String listName = list.getQName().getLocalName() + "Key";
+
+        if ((packageName != null) && (list != null) && (listName != null)) {
+            final String genTOName = CodeGeneratorHelper
+                    .parseToClassName(listName);
+            final GeneratedTOBuilder newType = new GeneratedTOBuilderImpl(
+                    packageName, genTOName);
+
+            return newType;
+        }
+        return null;
+    }
+
+    private boolean isPartOfListKey(final LeafSchemaNode leaf,
+            final List<String> keys) {
+        if ((leaf != null) && (keys != null) && (leaf.getQName() != null)) {
+            final String leafName = leaf.getQName().getLocalName();
+            if (keys.contains(leafName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private List<String> listKeys(final ListSchemaNode list) {
+        final List<String> listKeys = new ArrayList<String>();
+
+        if (list.getKeyDefinition() != null) {
+            final List<QName> keyDefinitions = list.getKeyDefinition();
+            
+            for (final QName keyDefinition : keyDefinitions) {
+                listKeys.add(keyDefinition.getLocalName());
+            }
+        }
+        return listKeys;
     }
 
     private GeneratedTypeBuilder resolveListTypeBuilder(
index 049f8d9..095208d 100644 (file)
@@ -10,73 +10,51 @@ package org.opendaylight.controller.sal.binding.yang.types.test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-import java.io.IOException;
-import java.io.InputStream;
 import java.util.List;
+import java.util.Set;
 
-import org.antlr.v4.runtime.ANTLRInputStream;
-import org.antlr.v4.runtime.CommonTokenStream;
-import org.antlr.v4.runtime.tree.ParseTree;
-import org.antlr.v4.runtime.tree.ParseTreeWalker;
 import org.junit.Test;
-import org.opendaylight.controller.antlrv4.code.gen.YangLexer;
-import org.opendaylight.controller.antlrv4.code.gen.YangParser;
-import org.opendaylight.controller.model.parser.builder.ModuleBuilder;
-import org.opendaylight.controller.model.parser.impl.YangModelParserImpl;
 import org.opendaylight.controller.sal.binding.generator.api.BindingGenerator;
 import org.opendaylight.controller.sal.binding.generator.impl.BindingGeneratorImpl;
+import org.opendaylight.controller.sal.binding.model.api.GeneratedProperty;
+import org.opendaylight.controller.sal.binding.model.api.GeneratedTransferObject;
 import org.opendaylight.controller.sal.binding.model.api.GeneratedType;
 import org.opendaylight.controller.sal.binding.model.api.MethodSignature;
+import org.opendaylight.controller.sal.binding.model.api.Type;
 import org.opendaylight.controller.yang.model.api.Module;
+import org.opendaylight.controller.yang.model.api.SchemaContext;
+import org.opendaylight.controller.yang.model.parser.api.YangModelParser;
+import org.opendaylight.controller.yang.model.parser.impl.YangModelParserImpl;
 
 public class GeneratedTypesTest {
 
-    private Module resolveModuleFromFile(final String filePath) {
-        try {
-            final InputStream inStream = getClass().getResourceAsStream(
-                    filePath);
-            if (inStream != null) {
-                ANTLRInputStream input = new ANTLRInputStream(inStream);
-                final YangLexer lexer = new YangLexer(input);
-                final CommonTokenStream tokens = new CommonTokenStream(lexer);
-                final YangParser parser = new YangParser(tokens);
+    private SchemaContext resolveSchemaContextFromFiles(
+            final String... yangFiles) {
+        final YangModelParser parser = new YangModelParserImpl();
+        final Set<Module> modules = parser.parseYangModels(yangFiles);
 
-                final ParseTree tree = parser.yang();
-                final ParseTreeWalker walker = new ParseTreeWalker();
-
-                final YangModelParserImpl modelParser = new YangModelParserImpl();
-                walker.walk(modelParser, tree);
-
-                final ModuleBuilder genModule = modelParser.getModuleBuilder();
-                final Module module = genModule.build();
-
-                return module;
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        return null;
+        return parser.resolveSchemaContext(modules);
     }
 
     @Test
     public void testContainerResolving() {
-        final Module module = resolveModuleFromFile("/simple-container-demo.yang");
-        assertTrue(module != null);
+        final String filePath = getClass().getResource("/simple-container-demo.yang").getPath();
+        final SchemaContext context = resolveSchemaContextFromFiles(filePath);
+        assertTrue(context != null);
 
         final BindingGenerator bindingGen = new BindingGeneratorImpl();
-        final List<GeneratedType> genTypes = bindingGen.generateTypes(module);
+        final List<Type> genTypes = bindingGen.generateTypes(context);
 
         assertTrue(genTypes != null);
-        assertEquals(genTypes.size(), 2);
-
-        final GeneratedType simpleContainer = genTypes.get(0);
-        final GeneratedType nestedContainer = genTypes.get(1);
+        assertEquals(2, genTypes.size());
 
-        assertEquals(simpleContainer.getName(), "SimpleContainer");
-        assertEquals(nestedContainer.getName(), "NestedContainer");
+        final GeneratedType simpleContainer = (GeneratedType) genTypes.get(0);
+        final GeneratedType nestedContainer = (GeneratedType) genTypes.get(1);
 
-        assertEquals(simpleContainer.getMethodDefinitions().size(), 4);
-        assertEquals(nestedContainer.getMethodDefinitions().size(), 4);
+        assertEquals("SimpleContainer", simpleContainer.getName());
+        assertEquals("NestedContainer", nestedContainer.getName());
+        assertEquals(4, simpleContainer.getMethodDefinitions().size());
+        assertEquals(4, nestedContainer.getMethodDefinitions().size());
 
         int methodsCount = 0;
         for (final MethodSignature method : simpleContainer
@@ -90,8 +68,8 @@ public class GeneratedTypesTest {
                 methodsCount++;
                 final MethodSignature.Parameter param = method.getParameters()
                         .get(0);
-                assertEquals(param.getName(), "foo");
-                assertEquals(param.getType().getName(), "Integer");
+                assertEquals("foo", param.getName());
+                assertEquals("Integer", param.getType().getName());
             }
 
             if (method.getName().equals("getBar")) {
@@ -104,7 +82,7 @@ public class GeneratedTypesTest {
                 methodsCount++;
             }
         }
-        assertEquals(methodsCount, 4);
+        assertEquals(4, methodsCount);
 
         methodsCount = 0;
         for (final MethodSignature method : nestedContainer
@@ -118,8 +96,8 @@ public class GeneratedTypesTest {
                 methodsCount++;
                 final MethodSignature.Parameter param = method.getParameters()
                         .get(0);
-                assertEquals(param.getName(), "foo");
-                assertEquals(param.getType().getName(), "Short");
+                assertEquals("foo", param.getName());
+                assertEquals("Short", param.getType().getName());
             }
 
             if (method.getName().equals("getBar")) {
@@ -132,30 +110,28 @@ public class GeneratedTypesTest {
                 methodsCount++;
             }
         }
-        assertEquals(methodsCount, 4);
+        assertEquals(4, methodsCount);
     }
 
     @Test
     public void testLeafListResolving() {
-        final Module module = resolveModuleFromFile("/simple-leaf-list-demo.yang");
-        assertTrue(module != null);
+        final String filePath = getClass().getResource("/simple-leaf-list-demo.yang").getPath();
+        final SchemaContext context = resolveSchemaContextFromFiles(filePath);
+        assertTrue(context != null);
 
         final BindingGenerator bindingGen = new BindingGeneratorImpl();
-        final List<GeneratedType> genTypes = bindingGen.generateTypes(module);
+        final List<Type> genTypes = bindingGen.generateTypes(context);
 
         assertTrue(genTypes != null);
-        assertEquals(genTypes.size(), 2);
+        assertEquals(2, genTypes.size());
 
-        final GeneratedType simpleContainer = genTypes.get(0);
-        final GeneratedType nestedContainer = genTypes.get(1);
+        final GeneratedType simpleContainer = (GeneratedType) genTypes.get(0);
+        final GeneratedType nestedContainer = (GeneratedType) genTypes.get(1);
 
-        assertEquals(simpleContainer.getName(), "SimpleContainer");
-        assertEquals(nestedContainer.getName(), "NestedContainer");
-
-        // FIXME: uncomment after fix in DOM tree parser - LeafSchemaNode bad
-        // isConfig resolving
-        assertEquals(simpleContainer.getMethodDefinitions().size(), 4);
-        assertEquals(nestedContainer.getMethodDefinitions().size(), 3);
+        assertEquals("SimpleContainer", simpleContainer.getName());
+        assertEquals("NestedContainer", nestedContainer.getName());
+        assertEquals(4, simpleContainer.getMethodDefinitions().size());
+        assertEquals(3, nestedContainer.getMethodDefinitions().size());
 
         int methodsCount = 0;
         for (final MethodSignature method : simpleContainer
@@ -169,8 +145,8 @@ public class GeneratedTypesTest {
                 methodsCount++;
                 final MethodSignature.Parameter param = method.getParameters()
                         .get(0);
-                assertEquals(param.getName(), "foo");
-                assertEquals(param.getType().getName(), "List");
+                assertEquals("foo", param.getName());
+                assertEquals("List", param.getType().getName());
             }
 
             if (method.getName().equals("getBar")) {
@@ -183,7 +159,7 @@ public class GeneratedTypesTest {
                 methodsCount++;
             }
         }
-        assertEquals(methodsCount, 4);
+        assertEquals(4, methodsCount);
 
         methodsCount = 0;
         for (final MethodSignature method : nestedContainer
@@ -197,8 +173,8 @@ public class GeneratedTypesTest {
                 methodsCount++;
                 final MethodSignature.Parameter param = method.getParameters()
                         .get(0);
-                assertEquals(param.getName(), "foo");
-                assertEquals(param.getType().getName(), "Short");
+                assertEquals("foo", param.getName());
+                assertEquals("Short", param.getType().getName());
             }
 
             if (method.getName().equals("getBar")) {
@@ -206,30 +182,160 @@ public class GeneratedTypesTest {
                 methodsCount++;
             }
         }
-        assertEquals(methodsCount, 3);
+        assertEquals(3, methodsCount);
     }
 
     @Test
     public void testListResolving() {
-        final Module module = resolveModuleFromFile("/simple-list-demo.yang");
-        assertTrue(module != null);
+        final String filePath = getClass().getResource("/simple-list-demo.yang").getPath();
+        final SchemaContext context = resolveSchemaContextFromFiles(filePath);
+        assertTrue(context != null);
 
         final BindingGenerator bindingGen = new BindingGeneratorImpl();
-        final List<GeneratedType> genTypes = bindingGen.generateTypes(module);
+        final List<Type> genTypes = bindingGen.generateTypes(context);
 
         assertTrue(genTypes != null);
-        assertEquals(genTypes.size(), 3);
+        assertEquals(4, genTypes.size());
+
+        int genTypesCount = 0;
+        int genTOsCount = 0;
+        for (final Type type : genTypes) {
+            if (type instanceof GeneratedType) {
+                final GeneratedType genType = (GeneratedType) type;
+                if (genType.getName().equals("ListParentContainer")) {
+                    assertEquals(2, genType.getMethodDefinitions().size());
+                    genTypesCount++;
+                } else if (genType.getName().equals("SimpleList")) {
+                    assertEquals(7, genType.getMethodDefinitions().size());
+                    final List<MethodSignature> methods = genType
+                            .getMethodDefinitions();
+                    int methodsCount = 0;
+                    for (final MethodSignature method : methods) {
+                        if (method.getName().equals("getSimpleListKey")) {
+                            assertEquals("SimpleListKey", method
+                                    .getReturnType().getName());
+                            methodsCount++;
+                        } else if (method.getName().equals(
+                                "getListChildContainer")) {
+                            assertEquals("ListChildContainer", method
+                                    .getReturnType().getName());
+                            methodsCount++;
+                        } else if (method.getName().equals("getFoo")) {
+                            methodsCount++;
+                        } else if (method.getName().equals("setFoo")) {
+                            methodsCount++;
+                        } else if (method.getName().equals("getSimpleLeafList")) {
+                            methodsCount++;
+                        } else if (method.getName().equals("setSimpleLeafList")) {
+                            methodsCount++;
+                        } else if (method.getName().equals("getBar")) {
+                            methodsCount++;
+                        }
+                    }
+                    assertEquals(7, methodsCount);
+                    genTypesCount++;
+                } else if (genType.getName().equals("ListChildContainer")) {
+                    assertEquals(2, genType.getMethodDefinitions().size());
+                    genTypesCount++;
+                }
+            } else if (type instanceof GeneratedTransferObject) {
+                genTOsCount++;
+                final GeneratedTransferObject genTO = (GeneratedTransferObject) type;
+                final List<GeneratedProperty> properties = genTO
+                        .getProperties();
+                final List<GeneratedProperty> hashProps = genTO
+                        .getHashCodeIdentifiers();
+                final List<GeneratedProperty> equalProps = genTO
+                        .getEqualsIdentifiers();
+
+                assertEquals(1, properties.size());
+                assertEquals("ListKey", properties.get(0).getName());
+                assertEquals("Byte", properties.get(0).getReturnType()
+                        .getName());
+                assertEquals(true, properties.get(0).isReadOnly());
+                assertEquals(1, hashProps.size());
+                assertEquals("ListKey", hashProps.get(0).getName());
+                assertEquals("Byte", hashProps.get(0).getReturnType().getName());
+                assertEquals(1, equalProps.size());
+                assertEquals("ListKey", equalProps.get(0).getName());
+                assertEquals("Byte", equalProps.get(0).getReturnType()
+                        .getName());
+            }
+        }
+        assertEquals(3, genTypesCount);
+        assertEquals(1, genTOsCount);
+    }
+
+    @Test
+    public void testListCompositeKeyResolving() {
+        final String filePath = getClass().getResource("/list-composite-key.yang").getPath();
+        final SchemaContext context = resolveSchemaContextFromFiles(filePath);
+
+        assertTrue(context != null);
+
+        final BindingGenerator bindingGen = new BindingGeneratorImpl();
+        final List<Type> genTypes = bindingGen.generateTypes(context);
+
+        assertTrue(genTypes != null);
+        assertEquals(6, genTypes.size());
+
+        int genTypesCount = 0;
+        int genTOsCount = 0;
+        for (final Type type : genTypes) {
+            if (type instanceof GeneratedType) {
+                genTypesCount++;
+            } else if (type instanceof GeneratedTransferObject) {
+                final GeneratedTransferObject genTO = (GeneratedTransferObject) type;
+
+                if (genTO.getName().equals("CompositeKeyListKey")) {
+                    final List<GeneratedProperty> properties = genTO
+                            .getProperties();
+                    int propertyCount = 0;
+                    for (final GeneratedProperty prop : properties) {
+                        if (prop.getName().equals("Key1")) {
+                            propertyCount++;
+                        } else if (prop.getName().equals("Key2")) {
+                            propertyCount++;
+                        }
+                    }
+                    assertEquals(2, propertyCount);
+                    genTOsCount++;
+                } else if (genTO.getName().equals("InnerListKey")) {
+                    final List<GeneratedProperty> properties = genTO
+                            .getProperties();
+                    assertEquals(1, properties.size());
+                    genTOsCount++;
+                }
+            }
+        }
+
+        assertEquals(4, genTypesCount);
+        assertEquals(2, genTOsCount);
     }
 
     @Test
     public void testGeneratedTypes() {
-        final Module module = resolveModuleFromFile("/demo-topology.yang");
-        assertTrue(module != null);
+        final String filePath = getClass().getResource("/demo-topology.yang").getPath();
+        final SchemaContext context = resolveSchemaContextFromFiles(filePath);
+        assertTrue(context != null);
 
         final BindingGenerator bindingGen = new BindingGeneratorImpl();
-        final List<GeneratedType> genTypes = bindingGen.generateTypes(module);
+        final List<Type> genTypes = bindingGen.generateTypes(context);
 
         assertTrue(genTypes != null);
-        assertEquals(genTypes.size(), 10);
+        assertEquals(13, genTypes.size());
+
+        int genTypesCount = 0;
+        int genTOsCount = 0;
+        for (final Type type : genTypes) {
+            if (type instanceof GeneratedType) {
+                genTypesCount++;
+            } else if (type instanceof GeneratedTransferObject) {
+                genTOsCount++;
+            }
+        }
+
+        assertEquals(10, genTypesCount);
+        assertEquals(3, genTOsCount);
     }
 }
diff --git a/opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/test/resources/list-composite-key.yang b/opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/test/resources/list-composite-key.yang
new file mode 100644 (file)
index 0000000..333c8bf
--- /dev/null
@@ -0,0 +1,63 @@
+module list-composite-key {
+    yang-version 1;
+    namespace "urn:composite.key";
+    prefix "scd";
+
+    organization "Cisco";
+
+    contact "WILL-BE-DEFINED-LATER";
+
+    description "
+        This module contains the definitions of elements that creates network 
+        topology i.e. definition of network nodes and links. This module is
+        not designed to be used solely for network representation. This module
+        SHOULD be used as base module in defining the network topology.
+    ";
+
+    revision "2013-02-27" {
+        reference " WILL BE DEFINED LATER";
+    }
+
+    container list-parent-container {
+
+        list composite-key-list {
+            key "key1 key2";
+
+            leaf key1 {
+                type int8;
+            }
+            
+            leaf key2 {
+                type string;
+            }
+            
+            list inner-list {
+                key "key1";
+                
+                leaf key1 {
+                    type uint16;
+                }
+                
+                leaf foo {
+                    type int32;
+                }
+            }
+            
+            leaf foo {
+                type int32;
+            }
+        }
+        
+        list no-key-list {
+            leaf foo {
+                type int32;
+            }
+            
+            leaf bar {
+                type decimal64 {
+                    fraction-digits 2;
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
index 36d0fbc..9df281f 100644 (file)
@@ -57,8 +57,7 @@ public class GeneratorJavaFileTest {
         generator.generateToFile(PATH);\r
 \r
         // path: test-dir/com/cisco/yang\r
-        String[] files = new File(PATH + FS + "com" + FS + "cisco" + FS\r
-                + "yang").list();\r
+        String[] files = new File(PATH + FS + "org" + FS + "opendaylight" + FS + "controller" + FS + "gen").list();\r
         List<String> filesList = Arrays.asList(files);\r
 \r
         assertEquals(3, files.length);\r
index 4abdc99..349a342 100644 (file)
@@ -1,11 +1,11 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved. \r
+/**\r
+\r
+ *\r
+ * March 2013\r
  *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ * Copyright (c) 2013 by Cisco Systems, Inc.\r
+ * All rights reserved.\r
  */\r
-\r
 package org.opendaylight.controller.sal.binding.model.api.type.builder;\r
 \r
 import org.opendaylight.controller.sal.binding.model.api.MethodSignature;\r
index 2a462a1..ff2c06e 100644 (file)
@@ -1,9 +1,9 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved. \r
+/**\r
+\r
+ *\r
+ * March 2013\r
  *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ * Copyright (c) 2013 by Cisco Systems, Inc.\r
+ * All rights reserved.\r
  */\r
-\r
 package org.opendaylight.controller.sal.binding.model.api.type.builder;
\ No newline at end of file
index dfa23fa..5860835 100644 (file)
           <artifactId>binding-generator-impl</artifactId>\r
           <version>1.0</version>\r
       </dependency>\r
-      <dependency>\r
-          <groupId>org.opendaylight.controller</groupId>\r
-          <artifactId>yang-model-parser-impl</artifactId>\r
-          <version>1.0</version>\r
-      </dependency>\r
       <dependency>\r
           <groupId>org.opendaylight.controller</groupId>\r
           <artifactId>binding-java-api-generator</artifactId>\r
index 6628966..2d38c7d 100644 (file)
@@ -1,50 +1,50 @@
 /*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved. \r
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
  *\r
  * This program and the accompanying materials are made available under the\r
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
  */\r
-\r
 package org.opendaylight.controller;\r
 \r
 import java.io.File;\r
-import java.util.Map;\r
-\r
-import org.opendaylight.controller.model.parser.builder.YangModelBuilder;\r
-\r
+import java.util.Set;\r
 \r
+import org.opendaylight.controller.yang.model.api.Module;\r
+import org.opendaylight.controller.yang.model.parser.impl.YangModelParserImpl;\r
 \r
 public class Demo {\r
 \r
-       public static void main(String[] args) throws Exception {\r
-\r
-               String yangFilesDir;\r
-               if(args.length > 0) {\r
-                       yangFilesDir = args[0];\r
-               } else {\r
-                       yangFilesDir = "src/main/resources";\r
-               }\r
-\r
-               File resourceDir = new File(yangFilesDir);\r
-               if(!resourceDir.exists()) {\r
-                       throw new IllegalArgumentException("Specified resource directory does not exists: "+ resourceDir.getAbsolutePath());\r
-               }\r
-\r
-               String[] dirList = resourceDir.list();\r
-               String[] absFiles = new String[dirList.length];\r
-\r
-               int i = 0;\r
-               for(String fileName : dirList) {\r
-                       File f = new File(fileName);\r
-                       absFiles[i] = f.getAbsolutePath();\r
-                       i++;\r
-               }\r
-\r
-        YangModelBuilder builder = new YangModelBuilder(absFiles);\r
-        Map<String, org.opendaylight.controller.yang.model.api.Module> builtModules = builder.build();\r
-\r
-        System.out.println("Modules built: "+ builtModules.size());\r
-       }\r
+    public static void main(String[] args) throws Exception {\r
+\r
+        String yangFilesDir;\r
+        if (args.length > 0) {\r
+            yangFilesDir = args[0];\r
+        } else {\r
+            yangFilesDir = "src/main/resources/demo";\r
+        }\r
+\r
+        File resourceDir = new File(yangFilesDir);\r
+        if (!resourceDir.exists()) {\r
+            throw new IllegalArgumentException(\r
+                    "Specified resource directory does not exists: "\r
+                            + resourceDir.getAbsolutePath());\r
+        }\r
+\r
+        String[] dirList = resourceDir.list();\r
+        String[] absFiles = new String[dirList.length];\r
+\r
+        int i = 0;\r
+        for (String fileName : dirList) {\r
+            File abs = new File(resourceDir, fileName);\r
+            absFiles[i] = abs.getAbsolutePath();\r
+            i++;\r
+        }\r
+\r
+        YangModelParserImpl parser = new YangModelParserImpl();\r
+        Set<Module> builtModules = parser.parseYangModels(absFiles);\r
+\r
+        System.out.println("Modules built: " + builtModules.size());\r
+    }\r
 \r
 }\r
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-api/pom.xml b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-api/pom.xml
new file mode 100644 (file)
index 0000000..5bfd19d
--- /dev/null
@@ -0,0 +1,17 @@
+<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.opendaylight.controller</groupId>
+    <artifactId>binding-generator</artifactId>
+    <version>1.0</version>
+  </parent>
+  <artifactId>yang-model-parser-api</artifactId>
+  
+  <dependencies>
+      <dependency>
+          <groupId>org.opendaylight.controller</groupId>
+          <artifactId>yang-model-api</artifactId>
+          <version>1.0</version>
+      </dependency>
+  </dependencies>
+</project>
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-api/src/main/java/org/opendaylight/controller/yang/model/parser/api/YangModelParser.java b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-api/src/main/java/org/opendaylight/controller/yang/model/parser/api/YangModelParser.java
new file mode 100644 (file)
index 0000000..8faf73e
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.yang.model.parser.api;
+
+import java.util.Set;
+
+import org.opendaylight.controller.model.api.type.UnknownTypeDefinition;
+import org.opendaylight.controller.yang.model.api.Module;
+import org.opendaylight.controller.yang.model.api.SchemaContext;
+
+/**
+ * Yang Model Parser interface is designed for parsing yang models and 
+ * convert the information to Data Schema Tree.
+ * 
+ */
+public interface YangModelParser {
+
+    /**
+     * Parse single Yang model file and return the schema definition of Yang
+     * module defined in *.Yang file.
+     * 
+     * @param yangFile
+     *            yang file to parse
+     * @return the schema definition of Yang module defined in .Yang file.
+     */
+    public Module parseYangModel(final String yangFile);
+
+    /**
+     * Parse one or more Yang model files and return the definitions of Yang
+     * modules defined in *.Yang files;
+     * <br>
+     * This method SHOULD be used if user need to parse multiple yang models
+     * that are referenced either through import or include statements.
+     * 
+     * @param yangFiles yang files to parse
+     * @return Set of Yang Modules
+     */
+    public Set<Module> parseYangModels(final String... yangFiles);
+
+    /**
+     * Creates {@link SchemaContext} from specified Modules. The modules SHOULD
+     * not contain any unresolved Schema Nodes or Type Definitions. By
+     * unresolved Schema Nodes or Type Definitions we mean that the Module
+     * should not contain ANY Schema Nodes that contains
+     * {@link UnknownTypeDefinition} and all dependencies although via import or
+     * include definitions are resolved.
+     * 
+     * @param modules
+     *            Set of Yang Modules
+     * @return Schema Context instance constructed from whole Set of Modules.
+     */
+    public SchemaContext resolveSchemaContext(final Set<Module> modules);
+}
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-api/src/main/java/org/opendaylight/controller/yang/model/parser/api/package-info.java b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-api/src/main/java/org/opendaylight/controller/yang/model/parser/api/package-info.java
new file mode 100644 (file)
index 0000000..2e8a029
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.yang.model.parser.api;
\ No newline at end of file
index 184abf0..e04cb70 100644 (file)
           <artifactId>yang-model-api</artifactId>\r
           <version>1.0</version>\r
       </dependency>\r
+      <dependency>\r
+          <groupId>org.opendaylight.controller</groupId>\r
+          <artifactId>yang-model-parser-api</artifactId>\r
+          <version>1.0</version>\r
+      </dependency>\r
       <dependency>\r
           <groupId>org.opendaylight.controller</groupId>\r
           <artifactId>yang-model-util</artifactId>\r
@@ -50,5 +55,5 @@
           <version>1.8.4</version>\r
       </dependency>\r
   </dependencies>\r
-  \r
-</project>
\ No newline at end of file
+\r
+</project>\r
index 0fbfc1c..4f7769e 100644 (file)
@@ -7,21 +7,21 @@
  */\r
 package org.opendaylight.controller.antlrv4.code.gen;\r
 \r
-import org.antlr.v4.runtime.CharStream;\r
 import org.antlr.v4.runtime.Lexer;\r
-import org.antlr.v4.runtime.RuleContext;\r
-import org.antlr.v4.runtime.atn.ATN;\r
-import org.antlr.v4.runtime.atn.ATNSimulator;\r
-import org.antlr.v4.runtime.atn.LexerATNSimulator;\r
-import org.antlr.v4.runtime.atn.PredictionContextCache;\r
+import org.antlr.v4.runtime.CharStream;\r
+import org.antlr.v4.runtime.Token;\r
+import org.antlr.v4.runtime.TokenStream;\r
+import org.antlr.v4.runtime.*;\r
+import org.antlr.v4.runtime.atn.*;\r
 import org.antlr.v4.runtime.dfa.DFA;\r
+import org.antlr.v4.runtime.misc.*;\r
 \r
 @SuppressWarnings({ "all", "warnings", "unchecked", "unused", "cast" })\r
 public class YangLexer extends Lexer {\r
     protected static final DFA[] _decisionToDFA;\r
     protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache();\r
     public static final int SEMICOLON = 1, LEFT_BRACE = 2, RIGHT_BRACE = 3,\r
-            PLUS = 4, WS = 5, LINE_COMMENT = 6, BLOCK_COMMENT = 7,\r
+            PLUS = 4, WS = 5, LINE_COMMENT = 6, START_BLOCK_COMMENT = 7,\r
             YIN_ELEMENT_KEYWORD = 8, YANG_VERSION_KEYWORD = 9,\r
             WHEN_KEYWORD = 10, VALUE_KEYWORD = 11, USES_KEYWORD = 12,\r
             UNITS_KEYWORD = 13, UNIQUE_KEYWORD = 14, TYPEDEF_KEYWORD = 15,\r
@@ -48,12 +48,14 @@ public class YangLexer extends Lexer {
             CHOICE_KEYWORD = 65, CASE_KEYWORD = 66, BIT_KEYWORD = 67,\r
             BELONGS_TO_KEYWORD = 68, BASE_KEYWORD = 69, AUGMENT_KEYWORD = 70,\r
             ARGUMENT_KEYWORD = 71, ANYXML_KEYWORD = 72, IDENTIFIER = 73,\r
-            STRING = 74, S = 75;\r
+            STRING = 74, S = 75, END_BLOCK_COMMENT = 76;\r
     public static final int VALUE_MODE = 1;\r
-    public static String[] modeNames = { "DEFAULT_MODE", "VALUE_MODE" };\r
+    public static final int BLOCK_COMMENT_MODE = 2;\r
+    public static String[] modeNames = { "DEFAULT_MODE", "VALUE_MODE",\r
+            "BLOCK_COMMENT_MODE" };\r
 \r
     public static final String[] tokenNames = { "<INVALID>", "SEMICOLON",\r
-            "LEFT_BRACE", "'}'", "'+'", "WS", "LINE_COMMENT", "BLOCK_COMMENT",\r
+            "LEFT_BRACE", "'}'", "'+'", "WS", "LINE_COMMENT", "'/*'",\r
             "'yin-element'", "'yang-version'", "'when'", "'value'", "'uses'",\r
             "'units'", "'unique'", "'typedef'", "'type'", "'submodule'",\r
             "'status'", "'rpc'", "'revision-date'", "'revision'",\r
@@ -69,9 +71,9 @@ public class YangLexer extends Lexer {
             "'description'", "'default'", "'container'", "'contact'",\r
             "'config'", "'choice'", "'case'", "'bit'", "'belongs-to'",\r
             "'base'", "'augment'", "'argument'", "'anyxml'", "IDENTIFIER",\r
-            "STRING", "S" };\r
+            "STRING", "S", "'*/'" };\r
     public static final String[] ruleNames = { "PLUS", "WS", "LINE_COMMENT",\r
-            "BLOCK_COMMENT", "SEMICOLON", "LEFT_BRACE", "RIGHT_BRACE",\r
+            "START_BLOCK_COMMENT", "SEMICOLON", "LEFT_BRACE", "RIGHT_BRACE",\r
             "YIN_ELEMENT_KEYWORD", "YANG_VERSION_KEYWORD", "WHEN_KEYWORD",\r
             "VALUE_KEYWORD", "USES_KEYWORD", "UNITS_KEYWORD", "UNIQUE_KEYWORD",\r
             "TYPEDEF_KEYWORD", "TYPE_KEYWORD", "SUBMODULE_KEYWORD",\r
@@ -95,7 +97,7 @@ public class YangLexer extends Lexer {
             "BASE_KEYWORD", "AUGMENT_KEYWORD", "ARGUMENT_KEYWORD",\r
             "ANYXML_KEYWORD", "IDENTIFIER", "ESC", "UNICODE", "HEX",\r
             "END_IDENTIFIER_SEMICOLON", "END_IDENTIFIER_LEFT_BRACE",\r
-            "SUB_STRING", "STRING", "S" };\r
+            "SUB_STRING", "STRING", "S", "END_BLOCK_COMMENT", "BLOCK_COMMENT" };\r
 \r
     public YangLexer(CharStream input) {\r
         super(input);\r
@@ -144,7 +146,7 @@ public class YangLexer extends Lexer {
             break;\r
 \r
         case 3:\r
-            BLOCK_COMMENT_action((RuleContext) _localctx, actionIndex);\r
+            START_BLOCK_COMMENT_action((RuleContext) _localctx, actionIndex);\r
             break;\r
 \r
         case 4:\r
@@ -433,6 +435,14 @@ public class YangLexer extends Lexer {
         case 80:\r
             S_action((RuleContext) _localctx, actionIndex);\r
             break;\r
+\r
+        case 81:\r
+            END_BLOCK_COMMENT_action((RuleContext) _localctx, actionIndex);\r
+            break;\r
+\r
+        case 82:\r
+            BLOCK_COMMENT_action((RuleContext) _localctx, actionIndex);\r
+            break;\r
         }\r
     }\r
 \r
@@ -667,7 +677,8 @@ public class YangLexer extends Lexer {
 \r
     private void BLOCK_COMMENT_action(RuleContext _localctx, int actionIndex) {\r
         switch (actionIndex) {\r
-        case 3:\r
+        case 76:\r
+            more();\r
             skip();\r
             break;\r
         }\r
@@ -856,6 +867,16 @@ public class YangLexer extends Lexer {
         }\r
     }\r
 \r
+    private void START_BLOCK_COMMENT_action(RuleContext _localctx,\r
+            int actionIndex) {\r
+        switch (actionIndex) {\r
+        case 3:\r
+            pushMode(BLOCK_COMMENT_MODE);\r
+            skip();\r
+            break;\r
+        }\r
+    }\r
+\r
     private void WS_action(RuleContext _localctx, int actionIndex) {\r
         switch (actionIndex) {\r
         case 1:\r
@@ -1006,6 +1027,15 @@ public class YangLexer extends Lexer {
         }\r
     }\r
 \r
+    private void END_BLOCK_COMMENT_action(RuleContext _localctx, int actionIndex) {\r
+        switch (actionIndex) {\r
+        case 75:\r
+            popMode();\r
+            skip();\r
+            break;\r
+        }\r
+    }\r
+\r
     private void BASE_KEYWORD_action(RuleContext _localctx, int actionIndex) {\r
         switch (actionIndex) {\r
         case 66:\r
@@ -1055,322 +1085,323 @@ public class YangLexer extends Lexer {
         }\r
     }\r
 \r
-    public static final String _serializedATN = "\2\4M\u03bf\b\1\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4"\r
-            + "\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4"\r
-            + "\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4"\r
-            + "\27\t\27\4\30\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4"\r
-            + "\36\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'"\r
-            + "\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4"\r
-            + "\62\t\62\4\63\t\63\4\64\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t"\r
-            + "9\4:\t:\4;\t;\4<\t<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4"\r
-            + "E\tE\4F\tF\4G\tG\4H\tH\4I\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\t"\r
-            + "P\4Q\tQ\4R\tR\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\7\4\u00b3"\r
-            + "\n\4\f\4\16\4\u00b6\13\4\3\4\3\4\3\5\3\5\3\5\3\5\7\5\u00be\n\5\f\5\16"\r
-            + "\5\u00c1\13\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\b"\r
-            + "\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3"\r
-            + "\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3"\r
-            + "\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3"\r
-            + "\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17"\r
-            + "\3\17\3\17\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20"\r
-            + "\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22"\r
-            + "\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23"\r
-            + "\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25"\r
-            + "\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26"\r
-            + "\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27"\r
-            + "\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\30\3\30"\r
-            + "\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\31\3\31"\r
-            + "\3\31\3\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\33"\r
-            + "\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3\34\3\34"\r
-            + "\3\34\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35"\r
-            + "\3\35\3\35\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\37\3\37"\r
-            + "\3\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3!\3!\3"\r
-            + "!\3!\3!\3!\3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\""\r
-            + "\3\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3$\3"\r
-            + "$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&\3&\3&\3&\3\'\3"\r
-            + "\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3(\3("\r
-            + "\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3*"\r
-            + "\3*\3*\3*\3*\3*\3*\3+\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\3,\3,\3,"\r
-            + "\3,\3,\3,\3,\3-\3-\3-\3-\3-\3-\3-\3.\3.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3/"\r
-            + "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61"\r
-            + "\3\61\3\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62"\r
-            + "\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63"\r
-            + "\3\63\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\65\3\65"\r
-            + "\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65"\r
-            + "\3\65\3\65\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\67\3\67"\r
-            + "\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\38\38\38\38\38\38\38\38\38\3"\r
-            + "8\38\38\39\39\39\39\39\39\39\39\39\39\39\39\3:\3:\3:\3:\3:\3:\3:\3:\3"\r
-            + ":\3:\3:\3:\3:\3:\3:\3:\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3"\r
-            + ";\3<\3<\3<\3<\3<\3<\3<\3=\3=\3=\3=\3=\3=\3=\3=\3=\3=\3=\3=\3=\3=\3>\3"\r
-            + ">\3>\3>\3>\3>\3>\3>\3>\3>\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3@\3@\3"\r
-            + "@\3@\3@\3@\3@\3@\3@\3@\3A\3A\3A\3A\3A\3A\3A\3A\3A\3B\3B\3B\3B\3B\3B\3"\r
-            + "B\3B\3B\3C\3C\3C\3C\3C\3C\3C\3D\3D\3D\3D\3D\3D\3E\3E\3E\3E\3E\3E\3E\3"\r
-            + "E\3E\3E\3E\3E\3E\3F\3F\3F\3F\3F\3F\3F\3G\3G\3G\3G\3G\3G\3G\3G\3G\3G\3"\r
-            + "H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3I\3I\3I\3I\3I\3I\3I\3I\3I\3J\3J\7J\u0382"\r
-            + "\nJ\fJ\16J\u0385\13J\3J\3J\3K\3K\3K\5K\u038c\nK\3L\3L\3L\3L\3L\3L\3M\3"\r
-            + "M\3N\3N\3N\3N\3O\3O\3O\3O\3P\3P\3P\7P\u03a1\nP\fP\16P\u03a4\13P\3P\3P"\r
-            + "\3P\3P\7P\u03aa\nP\fP\16P\u03ad\13P\3P\5P\u03b0\nP\3Q\3Q\6Q\u03b4\nQ\r"\r
-            + "Q\16Q\u03b5\5Q\u03b8\nQ\3Q\3Q\3R\3R\3R\3R\2S\4\6\2\6\7\3\b\b\4\n\t\5\f"\r
-            + "\3\6\16\4\7\20\5\b\22\n\t\24\13\n\26\f\13\30\r\f\32\16\r\34\17\16\36\20"\r
-            + "\17 \21\20\"\22\21$\23\22&\24\23(\25\24*\26\25,\27\26.\30\27\60\31\30"\r
-            + "\62\32\31\64\33\32\66\34\338\35\34:\36\35<\37\36> \37@!\1B\" D#!F$\"H"\r
-            + "%#J&$L\'%N(&P)\'R*(T+)V,*X-+Z.,\\/-^\60\1`\61.b\62/d\63\60f\64\61h\65"\r
-            + "\62j\66\63l\67\64n8\65p9\66r:\67t;8v<9x=:z>;|?<~@=\u0080A>\u0082B?\u0084"\r
-            + "C@\u0086DA\u0088EB\u008aFC\u008cGD\u008eHE\u0090IF\u0092JG\u0094KH\u0096"\r
-            + "\2\1\u0098\2\1\u009a\2\1\u009c\2I\u009e\2J\u00a0\2\1\u00a2LK\u00a4ML\4"\r
-            + "\2\3\r\5\13\f\17\17\"\"\4\f\f\17\17\2\6/;C\\aac|\7/\60\62<C\\aac|\n$$"\r
-            + "\61\61^^ddhhppttvv\5\62;CHch\3$$\3))\7\f\f\17\17\"\"==}}\5\13\f\17\17"\r
-            + "\"\"\u03c4\2\4\3\2\2\2\2\6\3\2\2\2\2\b\3\2\2\2\2\n\3\2\2\2\2\f\3\2\2\2"\r
-            + "\2\16\3\2\2\2\2\20\3\2\2\2\2\22\3\2\2\2\2\24\3\2\2\2\2\26\3\2\2\2\2\30"\r
-            + "\3\2\2\2\2\32\3\2\2\2\2\34\3\2\2\2\2\36\3\2\2\2\2 \3\2\2\2\2\"\3\2\2\2"\r
-            + "\2$\3\2\2\2\2&\3\2\2\2\2(\3\2\2\2\2*\3\2\2\2\2,\3\2\2\2\2.\3\2\2\2\2\60"\r
-            + "\3\2\2\2\2\62\3\2\2\2\2\64\3\2\2\2\2\66\3\2\2\2\28\3\2\2\2\2:\3\2\2\2"\r
-            + "\2<\3\2\2\2\2>\3\2\2\2\2@\3\2\2\2\2B\3\2\2\2\2D\3\2\2\2\2F\3\2\2\2\2H"\r
-            + "\3\2\2\2\2J\3\2\2\2\2L\3\2\2\2\2N\3\2\2\2\2P\3\2\2\2\2R\3\2\2\2\2T\3\2"\r
-            + "\2\2\2V\3\2\2\2\2X\3\2\2\2\2Z\3\2\2\2\2\\\3\2\2\2\2^\3\2\2\2\2`\3\2\2"\r
-            + "\2\2b\3\2\2\2\2d\3\2\2\2\2f\3\2\2\2\2h\3\2\2\2\2j\3\2\2\2\2l\3\2\2\2\2"\r
-            + "n\3\2\2\2\2p\3\2\2\2\2r\3\2\2\2\2t\3\2\2\2\2v\3\2\2\2\2x\3\2\2\2\2z\3"\r
-            + "\2\2\2\2|\3\2\2\2\2~\3\2\2\2\2\u0080\3\2\2\2\2\u0082\3\2\2\2\2\u0084\3"\r
-            + "\2\2\2\2\u0086\3\2\2\2\2\u0088\3\2\2\2\2\u008a\3\2\2\2\2\u008c\3\2\2\2"\r
-            + "\2\u008e\3\2\2\2\2\u0090\3\2\2\2\2\u0092\3\2\2\2\2\u0094\3\2\2\2\3\u009c"\r
-            + "\3\2\2\2\3\u009e\3\2\2\2\3\u00a2\3\2\2\2\3\u00a4\3\2\2\2\4\u00a6\3\2\2"\r
-            + "\2\6\u00aa\3\2\2\2\b\u00ae\3\2\2\2\n\u00b9\3\2\2\2\f\u00c7\3\2\2\2\16"\r
-            + "\u00cb\3\2\2\2\20\u00cf\3\2\2\2\22\u00d3\3\2\2\2\24\u00e1\3\2\2\2\26\u00f0"\r
-            + "\3\2\2\2\30\u00f7\3\2\2\2\32\u00ff\3\2\2\2\34\u0106\3\2\2\2\36\u010e\3"\r
-            + "\2\2\2 \u0117\3\2\2\2\"\u0121\3\2\2\2$\u0128\3\2\2\2&\u0134\3\2\2\2(\u013d"\r
-            + "\3\2\2\2*\u0143\3\2\2\2,\u0153\3\2\2\2.\u015e\3\2\2\2\60\u0171\3\2\2\2"\r
-            + "\62\u017a\3\2\2\2\64\u0186\3\2\2\2\66\u018e\3\2\2\28\u0199\3\2\2\2:\u01a2"\r
-            + "\3\2\2\2<\u01ad\3\2\2\2>\u01b7\3\2\2\2@\u01be\3\2\2\2B\u01c5\3\2\2\2D"\r
-            + "\u01d4\3\2\2\2F\u01e1\3\2\2\2H\u01f0\3\2\2\2J\u01fc\3\2\2\2L\u0203\3\2"\r
-            + "\2\2N\u020c\3\2\2\2P\u021b\3\2\2\2R\u022a\3\2\2\2T\u0236\3\2\2\2V\u023d"\r
-            + "\3\2\2\2X\u0246\3\2\2\2Z\u0252\3\2\2\2\\\u0259\3\2\2\2^\u025f\3\2\2\2"\r
-            + "`\u0265\3\2\2\2b\u026f\3\2\2\2d\u0278\3\2\2\2f\u0285\3\2\2\2h\u0290\3"\r
-            + "\2\2\2j\u029b\3\2\2\2l\u02ad\3\2\2\2n\u02b7\3\2\2\2p\u02c1\3\2\2\2r\u02cd"\r
-            + "\3\2\2\2t\u02d9\3\2\2\2v\u02e9\3\2\2\2x\u02f9\3\2\2\2z\u0300\3\2\2\2|"\r
-            + "\u030e\3\2\2\2~\u0318\3\2\2\2\u0080\u0324\3\2\2\2\u0082\u032e\3\2\2\2"\r
-            + "\u0084\u0337\3\2\2\2\u0086\u0340\3\2\2\2\u0088\u0347\3\2\2\2\u008a\u034d"\r
-            + "\3\2\2\2\u008c\u035a\3\2\2\2\u008e\u0361\3\2\2\2\u0090\u036b\3\2\2\2\u0092"\r
-            + "\u0376\3\2\2\2\u0094\u037f\3\2\2\2\u0096\u0388\3\2\2\2\u0098\u038d\3\2"\r
-            + "\2\2\u009a\u0393\3\2\2\2\u009c\u0395\3\2\2\2\u009e\u0399\3\2\2\2\u00a0"\r
-            + "\u03af\3\2\2\2\u00a2\u03b7\3\2\2\2\u00a4\u03bb\3\2\2\2\u00a6\u00a7\7-"\r
-            + "\2\2\u00a7\u00a8\3\2\2\2\u00a8\u00a9\b\2\2\2\u00a9\5\3\2\2\2\u00aa\u00ab"\r
-            + "\t\2\2\2\u00ab\u00ac\3\2\2\2\u00ac\u00ad\b\3\3\2\u00ad\7\3\2\2\2\u00ae"\r
-            + "\u00af\7\61\2\2\u00af\u00b0\7\61\2\2\u00b0\u00b4\3\2\2\2\u00b1\u00b3\n"\r
-            + "\3\2\2\u00b2\u00b1\3\2\2\2\u00b3\u00b6\3\2\2\2\u00b4\u00b2\3\2\2\2\u00b4"\r
-            + "\u00b5\3\2\2\2\u00b5\u00b7\3\2\2\2\u00b6\u00b4\3\2\2\2\u00b7\u00b8\b\4"\r
-            + "\4\2\u00b8\t\3\2\2\2\u00b9\u00ba\7\61\2\2\u00ba\u00bb\7,\2\2\u00bb\u00bf"\r
-            + "\3\2\2\2\u00bc\u00be\n\4\2\2\u00bd\u00bc\3\2\2\2\u00be\u00c1\3\2\2\2\u00bf"\r
-            + "\u00bd\3\2\2\2\u00bf\u00c0\3\2\2\2\u00c0\u00c2\3\2\2\2\u00c1\u00bf\3\2"\r
-            + "\2\2\u00c2\u00c3\7,\2\2\u00c3\u00c4\7\61\2\2\u00c4\u00c5\3\2\2\2\u00c5"\r
-            + "\u00c6\b\5\5\2\u00c6\13\3\2\2\2\u00c7\u00c8\7=\2\2\u00c8\u00c9\3\2\2\2"\r
-            + "\u00c9\u00ca\b\6\6\2\u00ca\r\3\2\2\2\u00cb\u00cc\7}\2\2\u00cc\u00cd\3"\r
-            + "\2\2\2\u00cd\u00ce\b\7\7\2\u00ce\17\3\2\2\2\u00cf\u00d0\7\177\2\2\u00d0"\r
-            + "\u00d1\3\2\2\2\u00d1\u00d2\b\b\b\2\u00d2\21\3\2\2\2\u00d3\u00d4\7{\2\2"\r
-            + "\u00d4\u00d5\7k\2\2\u00d5\u00d6\7p\2\2\u00d6\u00d7\7/\2\2\u00d7\u00d8"\r
-            + "\7g\2\2\u00d8\u00d9\7n\2\2\u00d9\u00da\7g\2\2\u00da\u00db\7o\2\2\u00db"\r
-            + "\u00dc\7g\2\2\u00dc\u00dd\7p\2\2\u00dd\u00de\7v\2\2\u00de\u00df\3\2\2"\r
-            + "\2\u00df\u00e0\b\t\t\2\u00e0\23\3\2\2\2\u00e1\u00e2\7{\2\2\u00e2\u00e3"\r
-            + "\7c\2\2\u00e3\u00e4\7p\2\2\u00e4\u00e5\7i\2\2\u00e5\u00e6\7/\2\2\u00e6"\r
-            + "\u00e7\7x\2\2\u00e7\u00e8\7g\2\2\u00e8\u00e9\7t\2\2\u00e9\u00ea\7u\2\2"\r
-            + "\u00ea\u00eb\7k\2\2\u00eb\u00ec\7q\2\2\u00ec\u00ed\7p\2\2\u00ed\u00ee"\r
-            + "\3\2\2\2\u00ee\u00ef\b\n\n\2\u00ef\25\3\2\2\2\u00f0\u00f1\7y\2\2\u00f1"\r
-            + "\u00f2\7j\2\2\u00f2\u00f3\7g\2\2\u00f3\u00f4\7p\2\2\u00f4\u00f5\3\2\2"\r
-            + "\2\u00f5\u00f6\b\13\13\2\u00f6\27\3\2\2\2\u00f7\u00f8\7x\2\2\u00f8\u00f9"\r
-            + "\7c\2\2\u00f9\u00fa\7n\2\2\u00fa\u00fb\7w\2\2\u00fb\u00fc\7g\2\2\u00fc"\r
-            + "\u00fd\3\2\2\2\u00fd\u00fe\b\f\f\2\u00fe\31\3\2\2\2\u00ff\u0100\7w\2\2"\r
-            + "\u0100\u0101\7u\2\2\u0101\u0102\7g\2\2\u0102\u0103\7u\2\2\u0103\u0104"\r
-            + "\3\2\2\2\u0104\u0105\b\r\r\2\u0105\33\3\2\2\2\u0106\u0107\7w\2\2\u0107"\r
-            + "\u0108\7p\2\2\u0108\u0109\7k\2\2\u0109\u010a\7v\2\2\u010a\u010b\7u\2\2"\r
-            + "\u010b\u010c\3\2\2\2\u010c\u010d\b\16\16\2\u010d\35\3\2\2\2\u010e\u010f"\r
-            + "\7w\2\2\u010f\u0110\7p\2\2\u0110\u0111\7k\2\2\u0111\u0112\7s\2\2\u0112"\r
-            + "\u0113\7w\2\2\u0113\u0114\7g\2\2\u0114\u0115\3\2\2\2\u0115\u0116\b\17"\r
-            + "\17\2\u0116\37\3\2\2\2\u0117\u0118\7v\2\2\u0118\u0119\7{\2\2\u0119\u011a"\r
-            + "\7r\2\2\u011a\u011b\7g\2\2\u011b\u011c\7f\2\2\u011c\u011d\7g\2\2\u011d"\r
-            + "\u011e\7h\2\2\u011e\u011f\3\2\2\2\u011f\u0120\b\20\20\2\u0120!\3\2\2\2"\r
-            + "\u0121\u0122\7v\2\2\u0122\u0123\7{\2\2\u0123\u0124\7r\2\2\u0124\u0125"\r
-            + "\7g\2\2\u0125\u0126\3\2\2\2\u0126\u0127\b\21\21\2\u0127#\3\2\2\2\u0128"\r
-            + "\u0129\7u\2\2\u0129\u012a\7w\2\2\u012a\u012b\7d\2\2\u012b\u012c\7o\2\2"\r
-            + "\u012c\u012d\7q\2\2\u012d\u012e\7f\2\2\u012e\u012f\7w\2\2\u012f\u0130"\r
-            + "\7n\2\2\u0130\u0131\7g\2\2\u0131\u0132\3\2\2\2\u0132\u0133\b\22\22\2\u0133"\r
-            + "%\3\2\2\2\u0134\u0135\7u\2\2\u0135\u0136\7v\2\2\u0136\u0137\7c\2\2\u0137"\r
-            + "\u0138\7v\2\2\u0138\u0139\7w\2\2\u0139\u013a\7u\2\2\u013a\u013b\3\2\2"\r
-            + "\2\u013b\u013c\b\23\23\2\u013c\'\3\2\2\2\u013d\u013e\7t\2\2\u013e\u013f"\r
-            + "\7r\2\2\u013f\u0140\7e\2\2\u0140\u0141\3\2\2\2\u0141\u0142\b\24\24\2\u0142"\r
-            + ")\3\2\2\2\u0143\u0144\7t\2\2\u0144\u0145\7g\2\2\u0145\u0146\7x\2\2\u0146"\r
-            + "\u0147\7k\2\2\u0147\u0148\7u\2\2\u0148\u0149\7k\2\2\u0149\u014a\7q\2\2"\r
-            + "\u014a\u014b\7p\2\2\u014b\u014c\7/\2\2\u014c\u014d\7f\2\2\u014d\u014e"\r
-            + "\7c\2\2\u014e\u014f\7v\2\2\u014f\u0150\7g\2\2\u0150\u0151\3\2\2\2\u0151"\r
-            + "\u0152\b\25\25\2\u0152+\3\2\2\2\u0153\u0154\7t\2\2\u0154\u0155\7g\2\2"\r
-            + "\u0155\u0156\7x\2\2\u0156\u0157\7k\2\2\u0157\u0158\7u\2\2\u0158\u0159"\r
-            + "\7k\2\2\u0159\u015a\7q\2\2\u015a\u015b\7p\2\2\u015b\u015c\3\2\2\2\u015c"\r
-            + "\u015d\b\26\26\2\u015d-\3\2\2\2\u015e\u015f\7t\2\2\u015f\u0160\7g\2\2"\r
-            + "\u0160\u0161\7s\2\2\u0161\u0162\7w\2\2\u0162\u0163\7k\2\2\u0163\u0164"\r
-            + "\7t\2\2\u0164\u0165\7g\2\2\u0165\u0166\7/\2\2\u0166\u0167\7k\2\2\u0167"\r
-            + "\u0168\7p\2\2\u0168\u0169\7u\2\2\u0169\u016a\7v\2\2\u016a\u016b\7c\2\2"\r
-            + "\u016b\u016c\7p\2\2\u016c\u016d\7e\2\2\u016d\u016e\7g\2\2\u016e\u016f"\r
-            + "\3\2\2\2\u016f\u0170\b\27\27\2\u0170/\3\2\2\2\u0171\u0172\7t\2\2\u0172"\r
-            + "\u0173\7g\2\2\u0173\u0174\7h\2\2\u0174\u0175\7k\2\2\u0175\u0176\7p\2\2"\r
-            + "\u0176\u0177\7g\2\2\u0177\u0178\3\2\2\2\u0178\u0179\b\30\30\2\u0179\61"\r
-            + "\3\2\2\2\u017a\u017b\7t\2\2\u017b\u017c\7g\2\2\u017c\u017d\7h\2\2\u017d"\r
-            + "\u017e\7g\2\2\u017e\u017f\7t\2\2\u017f\u0180\7g\2\2\u0180\u0181\7p\2\2"\r
-            + "\u0181\u0182\7e\2\2\u0182\u0183\7g\2\2\u0183\u0184\3\2\2\2\u0184\u0185"\r
-            + "\b\31\31\2\u0185\63\3\2\2\2\u0186\u0187\7t\2\2\u0187\u0188\7c\2\2\u0188"\r
-            + "\u0189\7p\2\2\u0189\u018a\7i\2\2\u018a\u018b\7g\2\2\u018b\u018c\3\2\2"\r
-            + "\2\u018c\u018d\b\32\32\2\u018d\65\3\2\2\2\u018e\u018f\7r\2\2\u018f\u0190"\r
-            + "\7t\2\2\u0190\u0191\7g\2\2\u0191\u0192\7u\2\2\u0192\u0193\7g\2\2\u0193"\r
-            + "\u0194\7p\2\2\u0194\u0195\7e\2\2\u0195\u0196\7g\2\2\u0196\u0197\3\2\2"\r
-            + "\2\u0197\u0198\b\33\33\2\u0198\67\3\2\2\2\u0199\u019a\7r\2\2\u019a\u019b"\r
-            + "\7t\2\2\u019b\u019c\7g\2\2\u019c\u019d\7h\2\2\u019d\u019e\7k\2\2\u019e"\r
-            + "\u019f\7z\2\2\u019f\u01a0\3\2\2\2\u01a0\u01a1\b\34\34\2\u01a19\3\2\2\2"\r
-            + "\u01a2\u01a3\7r\2\2\u01a3\u01a4\7q\2\2\u01a4\u01a5\7u\2\2\u01a5\u01a6"\r
-            + "\7k\2\2\u01a6\u01a7\7v\2\2\u01a7\u01a8\7k\2\2\u01a8\u01a9\7q\2\2\u01a9"\r
-            + "\u01aa\7p\2\2\u01aa\u01ab\3\2\2\2\u01ab\u01ac\b\35\35\2\u01ac;\3\2\2\2"\r
-            + "\u01ad\u01ae\7r\2\2\u01ae\u01af\7c\2\2\u01af\u01b0\7v\2\2\u01b0\u01b1"\r
-            + "\7v\2\2\u01b1\u01b2\7g\2\2\u01b2\u01b3\7t\2\2\u01b3\u01b4\7p\2\2\u01b4"\r
-            + "\u01b5\3\2\2\2\u01b5\u01b6\b\36\36\2\u01b6=\3\2\2\2\u01b7\u01b8\7r\2\2"\r
-            + "\u01b8\u01b9\7c\2\2\u01b9\u01ba\7v\2\2\u01ba\u01bb\7j\2\2\u01bb\u01bc"\r
-            + "\3\2\2\2\u01bc\u01bd\b\37\37\2\u01bd?\3\2\2\2\u01be\u01bf\7q\2\2\u01bf"\r
-            + "\u01c0\7w\2\2\u01c0\u01c1\7v\2\2\u01c1\u01c2\7r\2\2\u01c2\u01c3\7w\2\2"\r
-            + "\u01c3\u01c4\7v\2\2\u01c4A\3\2\2\2\u01c5\u01c6\7q\2\2\u01c6\u01c7\7t\2"\r
-            + "\2\u01c7\u01c8\7i\2\2\u01c8\u01c9\7c\2\2\u01c9\u01ca\7p\2\2\u01ca\u01cb"\r
-            + "\7k\2\2\u01cb\u01cc\7|\2\2\u01cc\u01cd\7c\2\2\u01cd\u01ce\7v\2\2\u01ce"\r
-            + "\u01cf\7k\2\2\u01cf\u01d0\7q\2\2\u01d0\u01d1\7p\2\2\u01d1\u01d2\3\2\2"\r
-            + "\2\u01d2\u01d3\b! \2\u01d3C\3\2\2\2\u01d4\u01d5\7q\2\2\u01d5\u01d6\7t"\r
-            + "\2\2\u01d6\u01d7\7f\2\2\u01d7\u01d8\7g\2\2\u01d8\u01d9\7t\2\2\u01d9\u01da"\r
-            + "\7g\2\2\u01da\u01db\7f\2\2\u01db\u01dc\7/\2\2\u01dc\u01dd\7d\2\2\u01dd"\r
-            + "\u01de\7{\2\2\u01de\u01df\3\2\2\2\u01df\u01e0\b\"!\2\u01e0E\3\2\2\2\u01e1"\r
-            + "\u01e2\7p\2\2\u01e2\u01e3\7q\2\2\u01e3\u01e4\7v\2\2\u01e4\u01e5\7k\2\2"\r
-            + "\u01e5\u01e6\7h\2\2\u01e6\u01e7\7k\2\2\u01e7\u01e8\7e\2\2\u01e8\u01e9"\r
-            + "\7c\2\2\u01e9\u01ea\7v\2\2\u01ea\u01eb\7k\2\2\u01eb\u01ec\7q\2\2\u01ec"\r
-            + "\u01ed\7p\2\2\u01ed\u01ee\3\2\2\2\u01ee\u01ef\b#\"\2\u01efG\3\2\2\2\u01f0"\r
-            + "\u01f1\7p\2\2\u01f1\u01f2\7c\2\2\u01f2\u01f3\7o\2\2\u01f3\u01f4\7g\2\2"\r
-            + "\u01f4\u01f5\7u\2\2\u01f5\u01f6\7r\2\2\u01f6\u01f7\7c\2\2\u01f7\u01f8"\r
-            + "\7e\2\2\u01f8\u01f9\7g\2\2\u01f9\u01fa\3\2\2\2\u01fa\u01fb\b$#\2\u01fb"\r
-            + "I\3\2\2\2\u01fc\u01fd\7o\2\2\u01fd\u01fe\7w\2\2\u01fe\u01ff\7u\2\2\u01ff"\r
-            + "\u0200\7v\2\2\u0200\u0201\3\2\2\2\u0201\u0202\b%$\2\u0202K\3\2\2\2\u0203"\r
-            + "\u0204\7o\2\2\u0204\u0205\7q\2\2\u0205\u0206\7f\2\2\u0206\u0207\7w\2\2"\r
-            + "\u0207\u0208\7n\2\2\u0208\u0209\7g\2\2\u0209\u020a\3\2\2\2\u020a\u020b"\r
-            + "\b&%\2\u020bM\3\2\2\2\u020c\u020d\7o\2\2\u020d\u020e\7k\2\2\u020e\u020f"\r
-            + "\7p\2\2\u020f\u0210\7/\2\2\u0210\u0211\7g\2\2\u0211\u0212\7n\2\2\u0212"\r
-            + "\u0213\7g\2\2\u0213\u0214\7o\2\2\u0214\u0215\7g\2\2\u0215\u0216\7p\2\2"\r
-            + "\u0216\u0217\7v\2\2\u0217\u0218\7u\2\2\u0218\u0219\3\2\2\2\u0219\u021a"\r
-            + "\b\'&\2\u021aO\3\2\2\2\u021b\u021c\7o\2\2\u021c\u021d\7c\2\2\u021d\u021e"\r
-            + "\7z\2\2\u021e\u021f\7/\2\2\u021f\u0220\7g\2\2\u0220\u0221\7n\2\2\u0221"\r
-            + "\u0222\7g\2\2\u0222\u0223\7o\2\2\u0223\u0224\7g\2\2\u0224\u0225\7p\2\2"\r
-            + "\u0225\u0226\7v\2\2\u0226\u0227\7u\2\2\u0227\u0228\3\2\2\2\u0228\u0229"\r
-            + "\b(\'\2\u0229Q\3\2\2\2\u022a\u022b\7o\2\2\u022b\u022c\7c\2\2\u022c\u022d"\r
-            + "\7p\2\2\u022d\u022e\7f\2\2\u022e\u022f\7c\2\2\u022f\u0230\7v\2\2\u0230"\r
-            + "\u0231\7q\2\2\u0231\u0232\7t\2\2\u0232\u0233\7{\2\2\u0233\u0234\3\2\2"\r
-            + "\2\u0234\u0235\b)(\2\u0235S\3\2\2\2\u0236\u0237\7n\2\2\u0237\u0238\7k"\r
-            + "\2\2\u0238\u0239\7u\2\2\u0239\u023a\7v\2\2\u023a\u023b\3\2\2\2\u023b\u023c"\r
-            + "\b*)\2\u023cU\3\2\2\2\u023d\u023e\7n\2\2\u023e\u023f\7g\2\2\u023f\u0240"\r
-            + "\7p\2\2\u0240\u0241\7i\2\2\u0241\u0242\7v\2\2\u0242\u0243\7j\2\2\u0243"\r
-            + "\u0244\3\2\2\2\u0244\u0245\b+*\2\u0245W\3\2\2\2\u0246\u0247\7n\2\2\u0247"\r
-            + "\u0248\7g\2\2\u0248\u0249\7c\2\2\u0249\u024a\7h\2\2\u024a\u024b\7/\2\2"\r
-            + "\u024b\u024c\7n\2\2\u024c\u024d\7k\2\2\u024d\u024e\7u\2\2\u024e\u024f"\r
-            + "\7v\2\2\u024f\u0250\3\2\2\2\u0250\u0251\b,+\2\u0251Y\3\2\2\2\u0252\u0253"\r
-            + "\7n\2\2\u0253\u0254\7g\2\2\u0254\u0255\7c\2\2\u0255\u0256\7h\2\2\u0256"\r
-            + "\u0257\3\2\2\2\u0257\u0258\b-,\2\u0258[\3\2\2\2\u0259\u025a\7m\2\2\u025a"\r
-            + "\u025b\7g\2\2\u025b\u025c\7{\2\2\u025c\u025d\3\2\2\2\u025d\u025e\b.-\2"\r
-            + "\u025e]\3\2\2\2\u025f\u0260\7k\2\2\u0260\u0261\7p\2\2\u0261\u0262\7r\2"\r
-            + "\2\u0262\u0263\7w\2\2\u0263\u0264\7v\2\2\u0264_\3\2\2\2\u0265\u0266\7"\r
-            + "k\2\2\u0266\u0267\7p\2\2\u0267\u0268\7e\2\2\u0268\u0269\7n\2\2\u0269\u026a"\r
-            + "\7w\2\2\u026a\u026b\7f\2\2\u026b\u026c\7g\2\2\u026c\u026d\3\2\2\2\u026d"\r
-            + "\u026e\b\60.\2\u026ea\3\2\2\2\u026f\u0270\7k\2\2\u0270\u0271\7o\2\2\u0271"\r
-            + "\u0272\7r\2\2\u0272\u0273\7q\2\2\u0273\u0274\7t\2\2\u0274\u0275\7v\2\2"\r
-            + "\u0275\u0276\3\2\2\2\u0276\u0277\b\61/\2\u0277c\3\2\2\2\u0278\u0279\7"\r
-            + "k\2\2\u0279\u027a\7h\2\2\u027a\u027b\7/\2\2\u027b\u027c\7h\2\2\u027c\u027d"\r
-            + "\7g\2\2\u027d\u027e\7c\2\2\u027e\u027f\7v\2\2\u027f\u0280\7w\2\2\u0280"\r
-            + "\u0281\7t\2\2\u0281\u0282\7g\2\2\u0282\u0283\3\2\2\2\u0283\u0284\b\62"\r
-            + "\60\2\u0284e\3\2\2\2\u0285\u0286\7k\2\2\u0286\u0287\7f\2\2\u0287\u0288"\r
-            + "\7g\2\2\u0288\u0289\7p\2\2\u0289\u028a\7v\2\2\u028a\u028b\7k\2\2\u028b"\r
-            + "\u028c\7v\2\2\u028c\u028d\7{\2\2\u028d\u028e\3\2\2\2\u028e\u028f\b\63"\r
-            + "\61\2\u028fg\3\2\2\2\u0290\u0291\7i\2\2\u0291\u0292\7t\2\2\u0292\u0293"\r
-            + "\7q\2\2\u0293\u0294\7w\2\2\u0294\u0295\7r\2\2\u0295\u0296\7k\2\2\u0296"\r
-            + "\u0297\7p\2\2\u0297\u0298\7i\2\2\u0298\u0299\3\2\2\2\u0299\u029a\b\64"\r
-            + "\62\2\u029ai\3\2\2\2\u029b\u029c\7h\2\2\u029c\u029d\7t\2\2\u029d\u029e"\r
-            + "\7c\2\2\u029e\u029f\7e\2\2\u029f\u02a0\7v\2\2\u02a0\u02a1\7k\2\2\u02a1"\r
-            + "\u02a2\7q\2\2\u02a2\u02a3\7p\2\2\u02a3\u02a4\7/\2\2\u02a4\u02a5\7f\2\2"\r
-            + "\u02a5\u02a6\7k\2\2\u02a6\u02a7\7i\2\2\u02a7\u02a8\7k\2\2\u02a8\u02a9"\r
-            + "\7v\2\2\u02a9\u02aa\7u\2\2\u02aa\u02ab\3\2\2\2\u02ab\u02ac\b\65\63\2\u02ac"\r
-            + "k\3\2\2\2\u02ad\u02ae\7h\2\2\u02ae\u02af\7g\2\2\u02af\u02b0\7c\2\2\u02b0"\r
-            + "\u02b1\7v\2\2\u02b1\u02b2\7w\2\2\u02b2\u02b3\7t\2\2\u02b3\u02b4\7g\2\2"\r
-            + "\u02b4\u02b5\3\2\2\2\u02b5\u02b6\b\66\64\2\u02b6m\3\2\2\2\u02b7\u02b8"\r
-            + "\7f\2\2\u02b8\u02b9\7g\2\2\u02b9\u02ba\7x\2\2\u02ba\u02bb\7k\2\2\u02bb"\r
-            + "\u02bc\7c\2\2\u02bc\u02bd\7v\2\2\u02bd\u02be\7g\2\2\u02be\u02bf\3\2\2"\r
-            + "\2\u02bf\u02c0\b\67\65\2\u02c0o\3\2\2\2\u02c1\u02c2\7f\2\2\u02c2\u02c3"\r
-            + "\7g\2\2\u02c3\u02c4\7x\2\2\u02c4\u02c5\7k\2\2\u02c5\u02c6\7c\2\2\u02c6"\r
-            + "\u02c7\7v\2\2\u02c7\u02c8\7k\2\2\u02c8\u02c9\7q\2\2\u02c9\u02ca\7p\2\2"\r
-            + "\u02ca\u02cb\3\2\2\2\u02cb\u02cc\b8\66\2\u02ccq\3\2\2\2\u02cd\u02ce\7"\r
-            + "g\2\2\u02ce\u02cf\7z\2\2\u02cf\u02d0\7v\2\2\u02d0\u02d1\7g\2\2\u02d1\u02d2"\r
-            + "\7p\2\2\u02d2\u02d3\7u\2\2\u02d3\u02d4\7k\2\2\u02d4\u02d5\7q\2\2\u02d5"\r
-            + "\u02d6\7p\2\2\u02d6\u02d7\3\2\2\2\u02d7\u02d8\b9\67\2\u02d8s\3\2\2\2\u02d9"\r
-            + "\u02da\7g\2\2\u02da\u02db\7t\2\2\u02db\u02dc\7t\2\2\u02dc\u02dd\7q\2\2"\r
-            + "\u02dd\u02de\7t\2\2\u02de\u02df\7/\2\2\u02df\u02e0\7o\2\2\u02e0\u02e1"\r
-            + "\7g\2\2\u02e1\u02e2\7u\2\2\u02e2\u02e3\7u\2\2\u02e3\u02e4\7c\2\2\u02e4"\r
-            + "\u02e5\7i\2\2\u02e5\u02e6\7g\2\2\u02e6\u02e7\3\2\2\2\u02e7\u02e8\b:8\2"\r
-            + "\u02e8u\3\2\2\2\u02e9\u02ea\7g\2\2\u02ea\u02eb\7t\2\2\u02eb\u02ec\7t\2"\r
-            + "\2\u02ec\u02ed\7q\2\2\u02ed\u02ee\7t\2\2\u02ee\u02ef\7/\2\2\u02ef\u02f0"\r
-            + "\7c\2\2\u02f0\u02f1\7r\2\2\u02f1\u02f2\7r\2\2\u02f2\u02f3\7/\2\2\u02f3"\r
-            + "\u02f4\7v\2\2\u02f4\u02f5\7c\2\2\u02f5\u02f6\7i\2\2\u02f6\u02f7\3\2\2"\r
-            + "\2\u02f7\u02f8\b;9\2\u02f8w\3\2\2\2\u02f9\u02fa\7g\2\2\u02fa\u02fb\7p"\r
-            + "\2\2\u02fb\u02fc\7w\2\2\u02fc\u02fd\7o\2\2\u02fd\u02fe\3\2\2\2\u02fe\u02ff"\r
-            + "\b<:\2\u02ffy\3\2\2\2\u0300\u0301\7f\2\2\u0301\u0302\7g\2\2\u0302\u0303"\r
-            + "\7u\2\2\u0303\u0304\7e\2\2\u0304\u0305\7t\2\2\u0305\u0306\7k\2\2\u0306"\r
-            + "\u0307\7r\2\2\u0307\u0308\7v\2\2\u0308\u0309\7k\2\2\u0309\u030a\7q\2\2"\r
-            + "\u030a\u030b\7p\2\2\u030b\u030c\3\2\2\2\u030c\u030d\b=;\2\u030d{\3\2\2"\r
-            + "\2\u030e\u030f\7f\2\2\u030f\u0310\7g\2\2\u0310\u0311\7h\2\2\u0311\u0312"\r
-            + "\7c\2\2\u0312\u0313\7w\2\2\u0313\u0314\7n\2\2\u0314\u0315\7v\2\2\u0315"\r
-            + "\u0316\3\2\2\2\u0316\u0317\b><\2\u0317}\3\2\2\2\u0318\u0319\7e\2\2\u0319"\r
-            + "\u031a\7q\2\2\u031a\u031b\7p\2\2\u031b\u031c\7v\2\2\u031c\u031d\7c\2\2"\r
-            + "\u031d\u031e\7k\2\2\u031e\u031f\7p\2\2\u031f\u0320\7g\2\2\u0320\u0321"\r
-            + "\7t\2\2\u0321\u0322\3\2\2\2\u0322\u0323\b?=\2\u0323\177\3\2\2\2\u0324"\r
-            + "\u0325\7e\2\2\u0325\u0326\7q\2\2\u0326\u0327\7p\2\2\u0327\u0328\7v\2\2"\r
-            + "\u0328\u0329\7c\2\2\u0329\u032a\7e\2\2\u032a\u032b\7v\2\2\u032b\u032c"\r
-            + "\3\2\2\2\u032c\u032d\b@>\2\u032d\u0081\3\2\2\2\u032e\u032f\7e\2\2\u032f"\r
-            + "\u0330\7q\2\2\u0330\u0331\7p\2\2\u0331\u0332\7h\2\2\u0332\u0333\7k\2\2"\r
-            + "\u0333\u0334\7i\2\2\u0334\u0335\3\2\2\2\u0335\u0336\bA?\2\u0336\u0083"\r
-            + "\3\2\2\2\u0337\u0338\7e\2\2\u0338\u0339\7j\2\2\u0339\u033a\7q\2\2\u033a"\r
-            + "\u033b\7k\2\2\u033b\u033c\7e\2\2\u033c\u033d\7g\2\2\u033d\u033e\3\2\2"\r
-            + "\2\u033e\u033f\bB@\2\u033f\u0085\3\2\2\2\u0340\u0341\7e\2\2\u0341\u0342"\r
-            + "\7c\2\2\u0342\u0343\7u\2\2\u0343\u0344\7g\2\2\u0344\u0345\3\2\2\2\u0345"\r
-            + "\u0346\bCA\2\u0346\u0087\3\2\2\2\u0347\u0348\7d\2\2\u0348\u0349\7k\2\2"\r
-            + "\u0349\u034a\7v\2\2\u034a\u034b\3\2\2\2\u034b\u034c\bDB\2\u034c\u0089"\r
-            + "\3\2\2\2\u034d\u034e\7d\2\2\u034e\u034f\7g\2\2\u034f\u0350\7n\2\2\u0350"\r
-            + "\u0351\7q\2\2\u0351\u0352\7p\2\2\u0352\u0353\7i\2\2\u0353\u0354\7u\2\2"\r
-            + "\u0354\u0355\7/\2\2\u0355\u0356\7v\2\2\u0356\u0357\7q\2\2\u0357\u0358"\r
-            + "\3\2\2\2\u0358\u0359\bEC\2\u0359\u008b\3\2\2\2\u035a\u035b\7d\2\2\u035b"\r
-            + "\u035c\7c\2\2\u035c\u035d\7u\2\2\u035d\u035e\7g\2\2\u035e\u035f\3\2\2"\r
-            + "\2\u035f\u0360\bFD\2\u0360\u008d\3\2\2\2\u0361\u0362\7c\2\2\u0362\u0363"\r
-            + "\7w\2\2\u0363\u0364\7i\2\2\u0364\u0365\7o\2\2\u0365\u0366\7g\2\2\u0366"\r
-            + "\u0367\7p\2\2\u0367\u0368\7v\2\2\u0368\u0369\3\2\2\2\u0369\u036a\bGE\2"\r
-            + "\u036a\u008f\3\2\2\2\u036b\u036c\7c\2\2\u036c\u036d\7t\2\2\u036d\u036e"\r
-            + "\7i\2\2\u036e\u036f\7w\2\2\u036f\u0370\7o\2\2\u0370\u0371\7g\2\2\u0371"\r
-            + "\u0372\7p\2\2\u0372\u0373\7v\2\2\u0373\u0374\3\2\2\2\u0374\u0375\bHF\2"\r
-            + "\u0375\u0091\3\2\2\2\u0376\u0377\7c\2\2\u0377\u0378\7p\2\2\u0378\u0379"\r
-            + "\7{\2\2\u0379\u037a\7z\2\2\u037a\u037b\7o\2\2\u037b\u037c\7n\2\2\u037c"\r
-            + "\u037d\3\2\2\2\u037d\u037e\bIG\2\u037e\u0093\3\2\2\2\u037f\u0383\t\5\2"\r
-            + "\2\u0380\u0382\t\6\2\2\u0381\u0380\3\2\2\2\u0382\u0385\3\2\2\2\u0383\u0381"\r
-            + "\3\2\2\2\u0383\u0384\3\2\2\2\u0384\u0386\3\2\2\2\u0385\u0383\3\2\2\2\u0386"\r
-            + "\u0387\bJH\2\u0387\u0095\3\2\2\2\u0388\u038b\7^\2\2\u0389\u038c\t\7\2"\r
-            + "\2\u038a\u038c\5\u0098L\2\u038b\u0389\3\2\2\2\u038b\u038a\3\2\2\2\u038c"\r
-            + "\u0097\3\2\2\2\u038d\u038e\7w\2\2\u038e\u038f\5\u009aM\2\u038f\u0390\5"\r
-            + "\u009aM\2\u0390\u0391\5\u009aM\2\u0391\u0392\5\u009aM\2\u0392\u0099\3"\r
-            + "\2\2\2\u0393\u0394\t\b\2\2\u0394\u009b\3\2\2\2\u0395\u0396\7=\2\2\u0396"\r
-            + "\u0397\3\2\2\2\u0397\u0398\bNI\2\u0398\u009d\3\2\2\2\u0399\u039a\7}\2"\r
-            + "\2\u039a\u039b\3\2\2\2\u039b\u039c\bOJ\2\u039c\u009f\3\2\2\2\u039d\u03a2"\r
-            + "\7$\2\2\u039e\u03a1\5\u0096K\2\u039f\u03a1\n\t\2\2\u03a0\u039e\3\2\2\2"\r
-            + "\u03a0\u039f\3\2\2\2\u03a1\u03a4\3\2\2\2\u03a2\u03a0\3\2\2\2\u03a2\u03a3"\r
-            + "\3\2\2\2\u03a3\u03a5\3\2\2\2\u03a4\u03a2\3\2\2\2\u03a5\u03b0\7$\2\2\u03a6"\r
-            + "\u03ab\7)\2\2\u03a7\u03aa\5\u0096K\2\u03a8\u03aa\n\n\2\2\u03a9\u03a7\3"\r
-            + "\2\2\2\u03a9\u03a8\3\2\2\2\u03aa\u03ad\3\2\2\2\u03ab\u03a9\3\2\2\2\u03ab"\r
-            + "\u03ac\3\2\2\2\u03ac\u03ae\3\2\2\2\u03ad\u03ab\3\2\2\2\u03ae\u03b0\7)"\r
-            + "\2\2\u03af\u039d\3\2\2\2\u03af\u03a6\3\2\2\2\u03b0\u00a1\3\2\2\2\u03b1"\r
-            + "\u03b8\5\u00a0P\2\u03b2\u03b4\n\13\2\2\u03b3\u03b2\3\2\2\2\u03b4\u03b5"\r
-            + "\3\2\2\2\u03b5\u03b3\3\2\2\2\u03b5\u03b6\3\2\2\2\u03b6\u03b8\3\2\2\2\u03b7"\r
-            + "\u03b1\3\2\2\2\u03b7\u03b3\3\2\2\2\u03b8\u03b9\3\2\2\2\u03b9\u03ba\bQ"\r
-            + "K\2\u03ba\u00a3\3\2\2\2\u03bb\u03bc\t\f\2\2\u03bc\u03bd\3\2\2\2\u03bd"\r
-            + "\u03be\bRL\2\u03be\u00a5\3\2\2\2\17\2\3\u00b4\u00bf\u0383\u038b\u03a0"\r
-            + "\u03a2\u03a9\u03ab\u03af\u03b5\u03b7";\r
+    public static final String _serializedATN = "\2\4N\u03c4\b\1\b\1\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t"\r
+            + "\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t"\r
+            + "\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t"\r
+            + "\26\4\27\t\27\4\30\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t"\r
+            + "\35\4\36\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4"\r
+            + "\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61"\r
+            + "\t\61\4\62\t\62\4\63\t\63\4\64\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t"\r
+            + "8\49\t9\4:\t:\4;\t;\4<\t<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4"\r
+            + "D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\t"\r
+            + "O\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\4\3"\r
+            + "\4\3\4\3\4\7\4\u00b8\n\4\f\4\16\4\u00bb\13\4\3\4\3\4\3\5\3\5\3\5\3\5\3"\r
+            + "\5\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t"\r
+            + "\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3"\r
+            + "\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f"\r
+            + "\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3"\r
+            + "\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3"\r
+            + "\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3"\r
+            + "\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3"\r
+            + "\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3"\r
+            + "\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3"\r
+            + "\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3"\r
+            + "\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3"\r
+            + "\27\3\27\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3"\r
+            + "\30\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\32\3"\r
+            + "\32\3\32\3\32\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3"\r
+            + "\33\3\33\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\35\3"\r
+            + "\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3"\r
+            + "\36\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3 \3 "\r
+            + "\3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3\"\3\"\3"\r
+            + "\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3#\3#"\r
+            + "\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%"\r
+            + "\3%\3%\3&\3&\3&\3&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'"\r
+            + "\3\'\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3("\r
+            + "\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3*\3*\3*\3*\3*\3*\3*\3+\3+\3+\3+"\r
+            + "\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\3,\3,\3,\3,\3,\3,\3,\3-\3-\3-\3-\3-\3-"\r
+            + "\3-\3.\3.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3/\3\60\3\60\3\60\3\60\3\60\3\60"\r
+            + "\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\62"\r
+            + "\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\63\3\63"\r
+            + "\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\64"\r
+            + "\3\64\3\64\3\64\3\64\3\64\3\64\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65"\r
+            + "\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\66\3\66\3\66\3\66"\r
+            + "\3\66\3\66\3\66\3\66\3\66\3\66\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67"\r
+            + "\3\67\3\67\38\38\38\38\38\38\38\38\38\38\38\38\39\39\39\39\39\39\39\3"\r
+            + "9\39\39\39\39\3:\3:\3:\3:\3:\3:\3:\3:\3:\3:\3:\3:\3:\3:\3:\3:\3;\3;\3"\r
+            + ";\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3<\3<\3<\3<\3<\3<\3<\3=\3=\3"\r
+            + "=\3=\3=\3=\3=\3=\3=\3=\3=\3=\3=\3=\3>\3>\3>\3>\3>\3>\3>\3>\3>\3>\3?\3"\r
+            + "?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3@\3@\3@\3@\3@\3@\3@\3@\3@\3@\3A\3A\3"\r
+            + "A\3A\3A\3A\3A\3A\3A\3B\3B\3B\3B\3B\3B\3B\3B\3B\3C\3C\3C\3C\3C\3C\3C\3"\r
+            + "D\3D\3D\3D\3D\3D\3E\3E\3E\3E\3E\3E\3E\3E\3E\3E\3E\3E\3E\3F\3F\3F\3F\3"\r
+            + "F\3F\3F\3G\3G\3G\3G\3G\3G\3G\3G\3G\3G\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3"\r
+            + "H\3I\3I\3I\3I\3I\3I\3I\3I\3I\3J\3J\7J\u037e\nJ\fJ\16J\u0381\13J\3J\3J"\r
+            + "\3K\3K\3K\5K\u0388\nK\3L\3L\3L\3L\3L\3L\3M\3M\3N\3N\3N\3N\3O\3O\3O\3O"\r
+            + "\3P\3P\3P\7P\u039d\nP\fP\16P\u03a0\13P\3P\3P\3P\3P\7P\u03a6\nP\fP\16P"\r
+            + "\u03a9\13P\3P\5P\u03ac\nP\3Q\3Q\6Q\u03b0\nQ\rQ\16Q\u03b1\5Q\u03b4\nQ\3"\r
+            + "Q\3Q\3R\3R\3R\3R\3S\3S\3S\3S\3S\3T\3T\3T\3T\2U\5\6\2\7\7\3\t\b\4\13\t"\r
+            + "\5\r\3\6\17\4\7\21\5\b\23\n\t\25\13\n\27\f\13\31\r\f\33\16\r\35\17\16"\r
+            + "\37\20\17!\21\20#\22\21%\23\22\'\24\23)\25\24+\26\25-\27\26/\30\27\61"\r
+            + "\31\30\63\32\31\65\33\32\67\34\339\35\34;\36\35=\37\36? \37A!\1C\" E#"\r
+            + "!G$\"I%#K&$M\'%O(&Q)\'S*(U+)W,*Y-+[.,]/-_\60\1a\61.c\62/e\63\60g\64\61"\r
+            + "i\65\62k\66\63m\67\64o8\65q9\66s:\67u;8w<9y=:{>;}?<\177@=\u0081A>\u0083"\r
+            + "B?\u0085C@\u0087DA\u0089EB\u008bFC\u008dGD\u008fHE\u0091IF\u0093JG\u0095"\r
+            + "KH\u0097\2\1\u0099\2\1\u009b\2\1\u009d\2I\u009f\2J\u00a1\2\1\u00a3LK\u00a5"\r
+            + "ML\u00a7NM\u00a9\2N\5\2\3\4\f\5\13\f\17\17\"\"\4\f\f\17\17\6/;C\\aac|"\r
+            + "\7/\60\62<C\\aac|\n$$\61\61^^ddhhppttvv\5\62;CHch\3$$\3))\7\f\f\17\17"\r
+            + "\"\"==}}\5\13\f\17\17\"\"\u03c7\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2"\r
+            + "\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3"\r
+            + "\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2"\r
+            + "\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2"\r
+            + "\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2"\r
+            + "\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2"\r
+            + "\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q"\r
+            + "\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2"\r
+            + "\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2"\r
+            + "\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w"\r
+            + "\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2"\r
+            + "\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b"\r
+            + "\3\2\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2\2\2\u0091\3\2\2\2\2\u0093\3\2\2"\r
+            + "\2\2\u0095\3\2\2\2\3\u009d\3\2\2\2\3\u009f\3\2\2\2\3\u00a3\3\2\2\2\3\u00a5"\r
+            + "\3\2\2\2\4\u00a7\3\2\2\2\4\u00a9\3\2\2\2\5\u00ab\3\2\2\2\7\u00af\3\2\2"\r
+            + "\2\t\u00b3\3\2\2\2\13\u00be\3\2\2\2\r\u00c3\3\2\2\2\17\u00c7\3\2\2\2\21"\r
+            + "\u00cb\3\2\2\2\23\u00cf\3\2\2\2\25\u00dd\3\2\2\2\27\u00ec\3\2\2\2\31\u00f3"\r
+            + "\3\2\2\2\33\u00fb\3\2\2\2\35\u0102\3\2\2\2\37\u010a\3\2\2\2!\u0113\3\2"\r
+            + "\2\2#\u011d\3\2\2\2%\u0124\3\2\2\2\'\u0130\3\2\2\2)\u0139\3\2\2\2+\u013f"\r
+            + "\3\2\2\2-\u014f\3\2\2\2/\u015a\3\2\2\2\61\u016d\3\2\2\2\63\u0176\3\2\2"\r
+            + "\2\65\u0182\3\2\2\2\67\u018a\3\2\2\29\u0195\3\2\2\2;\u019e\3\2\2\2=\u01a9"\r
+            + "\3\2\2\2?\u01b3\3\2\2\2A\u01ba\3\2\2\2C\u01c1\3\2\2\2E\u01d0\3\2\2\2G"\r
+            + "\u01dd\3\2\2\2I\u01ec\3\2\2\2K\u01f8\3\2\2\2M\u01ff\3\2\2\2O\u0208\3\2"\r
+            + "\2\2Q\u0217\3\2\2\2S\u0226\3\2\2\2U\u0232\3\2\2\2W\u0239\3\2\2\2Y\u0242"\r
+            + "\3\2\2\2[\u024e\3\2\2\2]\u0255\3\2\2\2_\u025b\3\2\2\2a\u0261\3\2\2\2c"\r
+            + "\u026b\3\2\2\2e\u0274\3\2\2\2g\u0281\3\2\2\2i\u028c\3\2\2\2k\u0297\3\2"\r
+            + "\2\2m\u02a9\3\2\2\2o\u02b3\3\2\2\2q\u02bd\3\2\2\2s\u02c9\3\2\2\2u\u02d5"\r
+            + "\3\2\2\2w\u02e5\3\2\2\2y\u02f5\3\2\2\2{\u02fc\3\2\2\2}\u030a\3\2\2\2\177"\r
+            + "\u0314\3\2\2\2\u0081\u0320\3\2\2\2\u0083\u032a\3\2\2\2\u0085\u0333\3\2"\r
+            + "\2\2\u0087\u033c\3\2\2\2\u0089\u0343\3\2\2\2\u008b\u0349\3\2\2\2\u008d"\r
+            + "\u0356\3\2\2\2\u008f\u035d\3\2\2\2\u0091\u0367\3\2\2\2\u0093\u0372\3\2"\r
+            + "\2\2\u0095\u037b\3\2\2\2\u0097\u0384\3\2\2\2\u0099\u0389\3\2\2\2\u009b"\r
+            + "\u038f\3\2\2\2\u009d\u0391\3\2\2\2\u009f\u0395\3\2\2\2\u00a1\u03ab\3\2"\r
+            + "\2\2\u00a3\u03b3\3\2\2\2\u00a5\u03b7\3\2\2\2\u00a7\u03bb\3\2\2\2\u00a9"\r
+            + "\u03c0\3\2\2\2\u00ab\u00ac\7-\2\2\u00ac\u00ad\3\2\2\2\u00ad\u00ae\b\2"\r
+            + "\2\2\u00ae\6\3\2\2\2\u00af\u00b0\t\2\2\2\u00b0\u00b1\3\2\2\2\u00b1\u00b2"\r
+            + "\b\3\3\2\u00b2\b\3\2\2\2\u00b3\u00b4\7\61\2\2\u00b4\u00b5\7\61\2\2\u00b5"\r
+            + "\u00b9\3\2\2\2\u00b6\u00b8\n\3\2\2\u00b7\u00b6\3\2\2\2\u00b8\u00bb\3\2"\r
+            + "\2\2\u00b9\u00b7\3\2\2\2\u00b9\u00ba\3\2\2\2\u00ba\u00bc\3\2\2\2\u00bb"\r
+            + "\u00b9\3\2\2\2\u00bc\u00bd\b\4\4\2\u00bd\n\3\2\2\2\u00be\u00bf\7\61\2"\r
+            + "\2\u00bf\u00c0\7,\2\2\u00c0\u00c1\3\2\2\2\u00c1\u00c2\b\5\5\2\u00c2\f"\r
+            + "\3\2\2\2\u00c3\u00c4\7=\2\2\u00c4\u00c5\3\2\2\2\u00c5\u00c6\b\6\6\2\u00c6"\r
+            + "\16\3\2\2\2\u00c7\u00c8\7}\2\2\u00c8\u00c9\3\2\2\2\u00c9\u00ca\b\7\7\2"\r
+            + "\u00ca\20\3\2\2\2\u00cb\u00cc\7\177\2\2\u00cc\u00cd\3\2\2\2\u00cd\u00ce"\r
+            + "\b\b\b\2\u00ce\22\3\2\2\2\u00cf\u00d0\7{\2\2\u00d0\u00d1\7k\2\2\u00d1"\r
+            + "\u00d2\7p\2\2\u00d2\u00d3\7/\2\2\u00d3\u00d4\7g\2\2\u00d4\u00d5\7n\2\2"\r
+            + "\u00d5\u00d6\7g\2\2\u00d6\u00d7\7o\2\2\u00d7\u00d8\7g\2\2\u00d8\u00d9"\r
+            + "\7p\2\2\u00d9\u00da\7v\2\2\u00da\u00db\3\2\2\2\u00db\u00dc\b\t\t\2\u00dc"\r
+            + "\24\3\2\2\2\u00dd\u00de\7{\2\2\u00de\u00df\7c\2\2\u00df\u00e0\7p\2\2\u00e0"\r
+            + "\u00e1\7i\2\2\u00e1\u00e2\7/\2\2\u00e2\u00e3\7x\2\2\u00e3\u00e4\7g\2\2"\r
+            + "\u00e4\u00e5\7t\2\2\u00e5\u00e6\7u\2\2\u00e6\u00e7\7k\2\2\u00e7\u00e8"\r
+            + "\7q\2\2\u00e8\u00e9\7p\2\2\u00e9\u00ea\3\2\2\2\u00ea\u00eb\b\n\n\2\u00eb"\r
+            + "\26\3\2\2\2\u00ec\u00ed\7y\2\2\u00ed\u00ee\7j\2\2\u00ee\u00ef\7g\2\2\u00ef"\r
+            + "\u00f0\7p\2\2\u00f0\u00f1\3\2\2\2\u00f1\u00f2\b\13\13\2\u00f2\30\3\2\2"\r
+            + "\2\u00f3\u00f4\7x\2\2\u00f4\u00f5\7c\2\2\u00f5\u00f6\7n\2\2\u00f6\u00f7"\r
+            + "\7w\2\2\u00f7\u00f8\7g\2\2\u00f8\u00f9\3\2\2\2\u00f9\u00fa\b\f\f\2\u00fa"\r
+            + "\32\3\2\2\2\u00fb\u00fc\7w\2\2\u00fc\u00fd\7u\2\2\u00fd\u00fe\7g\2\2\u00fe"\r
+            + "\u00ff\7u\2\2\u00ff\u0100\3\2\2\2\u0100\u0101\b\r\r\2\u0101\34\3\2\2\2"\r
+            + "\u0102\u0103\7w\2\2\u0103\u0104\7p\2\2\u0104\u0105\7k\2\2\u0105\u0106"\r
+            + "\7v\2\2\u0106\u0107\7u\2\2\u0107\u0108\3\2\2\2\u0108\u0109\b\16\16\2\u0109"\r
+            + "\36\3\2\2\2\u010a\u010b\7w\2\2\u010b\u010c\7p\2\2\u010c\u010d\7k\2\2\u010d"\r
+            + "\u010e\7s\2\2\u010e\u010f\7w\2\2\u010f\u0110\7g\2\2\u0110\u0111\3\2\2"\r
+            + "\2\u0111\u0112\b\17\17\2\u0112 \3\2\2\2\u0113\u0114\7v\2\2\u0114\u0115"\r
+            + "\7{\2\2\u0115\u0116\7r\2\2\u0116\u0117\7g\2\2\u0117\u0118\7f\2\2\u0118"\r
+            + "\u0119\7g\2\2\u0119\u011a\7h\2\2\u011a\u011b\3\2\2\2\u011b\u011c\b\20"\r
+            + "\20\2\u011c\"\3\2\2\2\u011d\u011e\7v\2\2\u011e\u011f\7{\2\2\u011f\u0120"\r
+            + "\7r\2\2\u0120\u0121\7g\2\2\u0121\u0122\3\2\2\2\u0122\u0123\b\21\21\2\u0123"\r
+            + "$\3\2\2\2\u0124\u0125\7u\2\2\u0125\u0126\7w\2\2\u0126\u0127\7d\2\2\u0127"\r
+            + "\u0128\7o\2\2\u0128\u0129\7q\2\2\u0129\u012a\7f\2\2\u012a\u012b\7w\2\2"\r
+            + "\u012b\u012c\7n\2\2\u012c\u012d\7g\2\2\u012d\u012e\3\2\2\2\u012e\u012f"\r
+            + "\b\22\22\2\u012f&\3\2\2\2\u0130\u0131\7u\2\2\u0131\u0132\7v\2\2\u0132"\r
+            + "\u0133\7c\2\2\u0133\u0134\7v\2\2\u0134\u0135\7w\2\2\u0135\u0136\7u\2\2"\r
+            + "\u0136\u0137\3\2\2\2\u0137\u0138\b\23\23\2\u0138(\3\2\2\2\u0139\u013a"\r
+            + "\7t\2\2\u013a\u013b\7r\2\2\u013b\u013c\7e\2\2\u013c\u013d\3\2\2\2\u013d"\r
+            + "\u013e\b\24\24\2\u013e*\3\2\2\2\u013f\u0140\7t\2\2\u0140\u0141\7g\2\2"\r
+            + "\u0141\u0142\7x\2\2\u0142\u0143\7k\2\2\u0143\u0144\7u\2\2\u0144\u0145"\r
+            + "\7k\2\2\u0145\u0146\7q\2\2\u0146\u0147\7p\2\2\u0147\u0148\7/\2\2\u0148"\r
+            + "\u0149\7f\2\2\u0149\u014a\7c\2\2\u014a\u014b\7v\2\2\u014b\u014c\7g\2\2"\r
+            + "\u014c\u014d\3\2\2\2\u014d\u014e\b\25\25\2\u014e,\3\2\2\2\u014f\u0150"\r
+            + "\7t\2\2\u0150\u0151\7g\2\2\u0151\u0152\7x\2\2\u0152\u0153\7k\2\2\u0153"\r
+            + "\u0154\7u\2\2\u0154\u0155\7k\2\2\u0155\u0156\7q\2\2\u0156\u0157\7p\2\2"\r
+            + "\u0157\u0158\3\2\2\2\u0158\u0159\b\26\26\2\u0159.\3\2\2\2\u015a\u015b"\r
+            + "\7t\2\2\u015b\u015c\7g\2\2\u015c\u015d\7s\2\2\u015d\u015e\7w\2\2\u015e"\r
+            + "\u015f\7k\2\2\u015f\u0160\7t\2\2\u0160\u0161\7g\2\2\u0161\u0162\7/\2\2"\r
+            + "\u0162\u0163\7k\2\2\u0163\u0164\7p\2\2\u0164\u0165\7u\2\2\u0165\u0166"\r
+            + "\7v\2\2\u0166\u0167\7c\2\2\u0167\u0168\7p\2\2\u0168\u0169\7e\2\2\u0169"\r
+            + "\u016a\7g\2\2\u016a\u016b\3\2\2\2\u016b\u016c\b\27\27\2\u016c\60\3\2\2"\r
+            + "\2\u016d\u016e\7t\2\2\u016e\u016f\7g\2\2\u016f\u0170\7h\2\2\u0170\u0171"\r
+            + "\7k\2\2\u0171\u0172\7p\2\2\u0172\u0173\7g\2\2\u0173\u0174\3\2\2\2\u0174"\r
+            + "\u0175\b\30\30\2\u0175\62\3\2\2\2\u0176\u0177\7t\2\2\u0177\u0178\7g\2"\r
+            + "\2\u0178\u0179\7h\2\2\u0179\u017a\7g\2\2\u017a\u017b\7t\2\2\u017b\u017c"\r
+            + "\7g\2\2\u017c\u017d\7p\2\2\u017d\u017e\7e\2\2\u017e\u017f\7g\2\2\u017f"\r
+            + "\u0180\3\2\2\2\u0180\u0181\b\31\31\2\u0181\64\3\2\2\2\u0182\u0183\7t\2"\r
+            + "\2\u0183\u0184\7c\2\2\u0184\u0185\7p\2\2\u0185\u0186\7i\2\2\u0186\u0187"\r
+            + "\7g\2\2\u0187\u0188\3\2\2\2\u0188\u0189\b\32\32\2\u0189\66\3\2\2\2\u018a"\r
+            + "\u018b\7r\2\2\u018b\u018c\7t\2\2\u018c\u018d\7g\2\2\u018d\u018e\7u\2\2"\r
+            + "\u018e\u018f\7g\2\2\u018f\u0190\7p\2\2\u0190\u0191\7e\2\2\u0191\u0192"\r
+            + "\7g\2\2\u0192\u0193\3\2\2\2\u0193\u0194\b\33\33\2\u01948\3\2\2\2\u0195"\r
+            + "\u0196\7r\2\2\u0196\u0197\7t\2\2\u0197\u0198\7g\2\2\u0198\u0199\7h\2\2"\r
+            + "\u0199\u019a\7k\2\2\u019a\u019b\7z\2\2\u019b\u019c\3\2\2\2\u019c\u019d"\r
+            + "\b\34\34\2\u019d:\3\2\2\2\u019e\u019f\7r\2\2\u019f\u01a0\7q\2\2\u01a0"\r
+            + "\u01a1\7u\2\2\u01a1\u01a2\7k\2\2\u01a2\u01a3\7v\2\2\u01a3\u01a4\7k\2\2"\r
+            + "\u01a4\u01a5\7q\2\2\u01a5\u01a6\7p\2\2\u01a6\u01a7\3\2\2\2\u01a7\u01a8"\r
+            + "\b\35\35\2\u01a8<\3\2\2\2\u01a9\u01aa\7r\2\2\u01aa\u01ab\7c\2\2\u01ab"\r
+            + "\u01ac\7v\2\2\u01ac\u01ad\7v\2\2\u01ad\u01ae\7g\2\2\u01ae\u01af\7t\2\2"\r
+            + "\u01af\u01b0\7p\2\2\u01b0\u01b1\3\2\2\2\u01b1\u01b2\b\36\36\2\u01b2>\3"\r
+            + "\2\2\2\u01b3\u01b4\7r\2\2\u01b4\u01b5\7c\2\2\u01b5\u01b6\7v\2\2\u01b6"\r
+            + "\u01b7\7j\2\2\u01b7\u01b8\3\2\2\2\u01b8\u01b9\b\37\37\2\u01b9@\3\2\2\2"\r
+            + "\u01ba\u01bb\7q\2\2\u01bb\u01bc\7w\2\2\u01bc\u01bd\7v\2\2\u01bd\u01be"\r
+            + "\7r\2\2\u01be\u01bf\7w\2\2\u01bf\u01c0\7v\2\2\u01c0B\3\2\2\2\u01c1\u01c2"\r
+            + "\7q\2\2\u01c2\u01c3\7t\2\2\u01c3\u01c4\7i\2\2\u01c4\u01c5\7c\2\2\u01c5"\r
+            + "\u01c6\7p\2\2\u01c6\u01c7\7k\2\2\u01c7\u01c8\7|\2\2\u01c8\u01c9\7c\2\2"\r
+            + "\u01c9\u01ca\7v\2\2\u01ca\u01cb\7k\2\2\u01cb\u01cc\7q\2\2\u01cc\u01cd"\r
+            + "\7p\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cf\b! \2\u01cfD\3\2\2\2\u01d0\u01d1"\r
+            + "\7q\2\2\u01d1\u01d2\7t\2\2\u01d2\u01d3\7f\2\2\u01d3\u01d4\7g\2\2\u01d4"\r
+            + "\u01d5\7t\2\2\u01d5\u01d6\7g\2\2\u01d6\u01d7\7f\2\2\u01d7\u01d8\7/\2\2"\r
+            + "\u01d8\u01d9\7d\2\2\u01d9\u01da\7{\2\2\u01da\u01db\3\2\2\2\u01db\u01dc"\r
+            + "\b\"!\2\u01dcF\3\2\2\2\u01dd\u01de\7p\2\2\u01de\u01df\7q\2\2\u01df\u01e0"\r
+            + "\7v\2\2\u01e0\u01e1\7k\2\2\u01e1\u01e2\7h\2\2\u01e2\u01e3\7k\2\2\u01e3"\r
+            + "\u01e4\7e\2\2\u01e4\u01e5\7c\2\2\u01e5\u01e6\7v\2\2\u01e6\u01e7\7k\2\2"\r
+            + "\u01e7\u01e8\7q\2\2\u01e8\u01e9\7p\2\2\u01e9\u01ea\3\2\2\2\u01ea\u01eb"\r
+            + "\b#\"\2\u01ebH\3\2\2\2\u01ec\u01ed\7p\2\2\u01ed\u01ee\7c\2\2\u01ee\u01ef"\r
+            + "\7o\2\2\u01ef\u01f0\7g\2\2\u01f0\u01f1\7u\2\2\u01f1\u01f2\7r\2\2\u01f2"\r
+            + "\u01f3\7c\2\2\u01f3\u01f4\7e\2\2\u01f4\u01f5\7g\2\2\u01f5\u01f6\3\2\2"\r
+            + "\2\u01f6\u01f7\b$#\2\u01f7J\3\2\2\2\u01f8\u01f9\7o\2\2\u01f9\u01fa\7w"\r
+            + "\2\2\u01fa\u01fb\7u\2\2\u01fb\u01fc\7v\2\2\u01fc\u01fd\3\2\2\2\u01fd\u01fe"\r
+            + "\b%$\2\u01feL\3\2\2\2\u01ff\u0200\7o\2\2\u0200\u0201\7q\2\2\u0201\u0202"\r
+            + "\7f\2\2\u0202\u0203\7w\2\2\u0203\u0204\7n\2\2\u0204\u0205\7g\2\2\u0205"\r
+            + "\u0206\3\2\2\2\u0206\u0207\b&%\2\u0207N\3\2\2\2\u0208\u0209\7o\2\2\u0209"\r
+            + "\u020a\7k\2\2\u020a\u020b\7p\2\2\u020b\u020c\7/\2\2\u020c\u020d\7g\2\2"\r
+            + "\u020d\u020e\7n\2\2\u020e\u020f\7g\2\2\u020f\u0210\7o\2\2\u0210\u0211"\r
+            + "\7g\2\2\u0211\u0212\7p\2\2\u0212\u0213\7v\2\2\u0213\u0214\7u\2\2\u0214"\r
+            + "\u0215\3\2\2\2\u0215\u0216\b\'&\2\u0216P\3\2\2\2\u0217\u0218\7o\2\2\u0218"\r
+            + "\u0219\7c\2\2\u0219\u021a\7z\2\2\u021a\u021b\7/\2\2\u021b\u021c\7g\2\2"\r
+            + "\u021c\u021d\7n\2\2\u021d\u021e\7g\2\2\u021e\u021f\7o\2\2\u021f\u0220"\r
+            + "\7g\2\2\u0220\u0221\7p\2\2\u0221\u0222\7v\2\2\u0222\u0223\7u\2\2\u0223"\r
+            + "\u0224\3\2\2\2\u0224\u0225\b(\'\2\u0225R\3\2\2\2\u0226\u0227\7o\2\2\u0227"\r
+            + "\u0228\7c\2\2\u0228\u0229\7p\2\2\u0229\u022a\7f\2\2\u022a\u022b\7c\2\2"\r
+            + "\u022b\u022c\7v\2\2\u022c\u022d\7q\2\2\u022d\u022e\7t\2\2\u022e\u022f"\r
+            + "\7{\2\2\u022f\u0230\3\2\2\2\u0230\u0231\b)(\2\u0231T\3\2\2\2\u0232\u0233"\r
+            + "\7n\2\2\u0233\u0234\7k\2\2\u0234\u0235\7u\2\2\u0235\u0236\7v\2\2\u0236"\r
+            + "\u0237\3\2\2\2\u0237\u0238\b*)\2\u0238V\3\2\2\2\u0239\u023a\7n\2\2\u023a"\r
+            + "\u023b\7g\2\2\u023b\u023c\7p\2\2\u023c\u023d\7i\2\2\u023d\u023e\7v\2\2"\r
+            + "\u023e\u023f\7j\2\2\u023f\u0240\3\2\2\2\u0240\u0241\b+*\2\u0241X\3\2\2"\r
+            + "\2\u0242\u0243\7n\2\2\u0243\u0244\7g\2\2\u0244\u0245\7c\2\2\u0245\u0246"\r
+            + "\7h\2\2\u0246\u0247\7/\2\2\u0247\u0248\7n\2\2\u0248\u0249\7k\2\2\u0249"\r
+            + "\u024a\7u\2\2\u024a\u024b\7v\2\2\u024b\u024c\3\2\2\2\u024c\u024d\b,+\2"\r
+            + "\u024dZ\3\2\2\2\u024e\u024f\7n\2\2\u024f\u0250\7g\2\2\u0250\u0251\7c\2"\r
+            + "\2\u0251\u0252\7h\2\2\u0252\u0253\3\2\2\2\u0253\u0254\b-,\2\u0254\\\3"\r
+            + "\2\2\2\u0255\u0256\7m\2\2\u0256\u0257\7g\2\2\u0257\u0258\7{\2\2\u0258"\r
+            + "\u0259\3\2\2\2\u0259\u025a\b.-\2\u025a^\3\2\2\2\u025b\u025c\7k\2\2\u025c"\r
+            + "\u025d\7p\2\2\u025d\u025e\7r\2\2\u025e\u025f\7w\2\2\u025f\u0260\7v\2\2"\r
+            + "\u0260`\3\2\2\2\u0261\u0262\7k\2\2\u0262\u0263\7p\2\2\u0263\u0264\7e\2"\r
+            + "\2\u0264\u0265\7n\2\2\u0265\u0266\7w\2\2\u0266\u0267\7f\2\2\u0267\u0268"\r
+            + "\7g\2\2\u0268\u0269\3\2\2\2\u0269\u026a\b\60.\2\u026ab\3\2\2\2\u026b\u026c"\r
+            + "\7k\2\2\u026c\u026d\7o\2\2\u026d\u026e\7r\2\2\u026e\u026f\7q\2\2\u026f"\r
+            + "\u0270\7t\2\2\u0270\u0271\7v\2\2\u0271\u0272\3\2\2\2\u0272\u0273\b\61"\r
+            + "/\2\u0273d\3\2\2\2\u0274\u0275\7k\2\2\u0275\u0276\7h\2\2\u0276\u0277\7"\r
+            + "/\2\2\u0277\u0278\7h\2\2\u0278\u0279\7g\2\2\u0279\u027a\7c\2\2\u027a\u027b"\r
+            + "\7v\2\2\u027b\u027c\7w\2\2\u027c\u027d\7t\2\2\u027d\u027e\7g\2\2\u027e"\r
+            + "\u027f\3\2\2\2\u027f\u0280\b\62\60\2\u0280f\3\2\2\2\u0281\u0282\7k\2\2"\r
+            + "\u0282\u0283\7f\2\2\u0283\u0284\7g\2\2\u0284\u0285\7p\2\2\u0285\u0286"\r
+            + "\7v\2\2\u0286\u0287\7k\2\2\u0287\u0288\7v\2\2\u0288\u0289\7{\2\2\u0289"\r
+            + "\u028a\3\2\2\2\u028a\u028b\b\63\61\2\u028bh\3\2\2\2\u028c\u028d\7i\2\2"\r
+            + "\u028d\u028e\7t\2\2\u028e\u028f\7q\2\2\u028f\u0290\7w\2\2\u0290\u0291"\r
+            + "\7r\2\2\u0291\u0292\7k\2\2\u0292\u0293\7p\2\2\u0293\u0294\7i\2\2\u0294"\r
+            + "\u0295\3\2\2\2\u0295\u0296\b\64\62\2\u0296j\3\2\2\2\u0297\u0298\7h\2\2"\r
+            + "\u0298\u0299\7t\2\2\u0299\u029a\7c\2\2\u029a\u029b\7e\2\2\u029b\u029c"\r
+            + "\7v\2\2\u029c\u029d\7k\2\2\u029d\u029e\7q\2\2\u029e\u029f\7p\2\2\u029f"\r
+            + "\u02a0\7/\2\2\u02a0\u02a1\7f\2\2\u02a1\u02a2\7k\2\2\u02a2\u02a3\7i\2\2"\r
+            + "\u02a3\u02a4\7k\2\2\u02a4\u02a5\7v\2\2\u02a5\u02a6\7u\2\2\u02a6\u02a7"\r
+            + "\3\2\2\2\u02a7\u02a8\b\65\63\2\u02a8l\3\2\2\2\u02a9\u02aa\7h\2\2\u02aa"\r
+            + "\u02ab\7g\2\2\u02ab\u02ac\7c\2\2\u02ac\u02ad\7v\2\2\u02ad\u02ae\7w\2\2"\r
+            + "\u02ae\u02af\7t\2\2\u02af\u02b0\7g\2\2\u02b0\u02b1\3\2\2\2\u02b1\u02b2"\r
+            + "\b\66\64\2\u02b2n\3\2\2\2\u02b3\u02b4\7f\2\2\u02b4\u02b5\7g\2\2\u02b5"\r
+            + "\u02b6\7x\2\2\u02b6\u02b7\7k\2\2\u02b7\u02b8\7c\2\2\u02b8\u02b9\7v\2\2"\r
+            + "\u02b9\u02ba\7g\2\2\u02ba\u02bb\3\2\2\2\u02bb\u02bc\b\67\65\2\u02bcp\3"\r
+            + "\2\2\2\u02bd\u02be\7f\2\2\u02be\u02bf\7g\2\2\u02bf\u02c0\7x\2\2\u02c0"\r
+            + "\u02c1\7k\2\2\u02c1\u02c2\7c\2\2\u02c2\u02c3\7v\2\2\u02c3\u02c4\7k\2\2"\r
+            + "\u02c4\u02c5\7q\2\2\u02c5\u02c6\7p\2\2\u02c6\u02c7\3\2\2\2\u02c7\u02c8"\r
+            + "\b8\66\2\u02c8r\3\2\2\2\u02c9\u02ca\7g\2\2\u02ca\u02cb\7z\2\2\u02cb\u02cc"\r
+            + "\7v\2\2\u02cc\u02cd\7g\2\2\u02cd\u02ce\7p\2\2\u02ce\u02cf\7u\2\2\u02cf"\r
+            + "\u02d0\7k\2\2\u02d0\u02d1\7q\2\2\u02d1\u02d2\7p\2\2\u02d2\u02d3\3\2\2"\r
+            + "\2\u02d3\u02d4\b9\67\2\u02d4t\3\2\2\2\u02d5\u02d6\7g\2\2\u02d6\u02d7\7"\r
+            + "t\2\2\u02d7\u02d8\7t\2\2\u02d8\u02d9\7q\2\2\u02d9\u02da\7t\2\2\u02da\u02db"\r
+            + "\7/\2\2\u02db\u02dc\7o\2\2\u02dc\u02dd\7g\2\2\u02dd\u02de\7u\2\2\u02de"\r
+            + "\u02df\7u\2\2\u02df\u02e0\7c\2\2\u02e0\u02e1\7i\2\2\u02e1\u02e2\7g\2\2"\r
+            + "\u02e2\u02e3\3\2\2\2\u02e3\u02e4\b:8\2\u02e4v\3\2\2\2\u02e5\u02e6\7g\2"\r
+            + "\2\u02e6\u02e7\7t\2\2\u02e7\u02e8\7t\2\2\u02e8\u02e9\7q\2\2\u02e9\u02ea"\r
+            + "\7t\2\2\u02ea\u02eb\7/\2\2\u02eb\u02ec\7c\2\2\u02ec\u02ed\7r\2\2\u02ed"\r
+            + "\u02ee\7r\2\2\u02ee\u02ef\7/\2\2\u02ef\u02f0\7v\2\2\u02f0\u02f1\7c\2\2"\r
+            + "\u02f1\u02f2\7i\2\2\u02f2\u02f3\3\2\2\2\u02f3\u02f4\b;9\2\u02f4x\3\2\2"\r
+            + "\2\u02f5\u02f6\7g\2\2\u02f6\u02f7\7p\2\2\u02f7\u02f8\7w\2\2\u02f8\u02f9"\r
+            + "\7o\2\2\u02f9\u02fa\3\2\2\2\u02fa\u02fb\b<:\2\u02fbz\3\2\2\2\u02fc\u02fd"\r
+            + "\7f\2\2\u02fd\u02fe\7g\2\2\u02fe\u02ff\7u\2\2\u02ff\u0300\7e\2\2\u0300"\r
+            + "\u0301\7t\2\2\u0301\u0302\7k\2\2\u0302\u0303\7r\2\2\u0303\u0304\7v\2\2"\r
+            + "\u0304\u0305\7k\2\2\u0305\u0306\7q\2\2\u0306\u0307\7p\2\2\u0307\u0308"\r
+            + "\3\2\2\2\u0308\u0309\b=;\2\u0309|\3\2\2\2\u030a\u030b\7f\2\2\u030b\u030c"\r
+            + "\7g\2\2\u030c\u030d\7h\2\2\u030d\u030e\7c\2\2\u030e\u030f\7w\2\2\u030f"\r
+            + "\u0310\7n\2\2\u0310\u0311\7v\2\2\u0311\u0312\3\2\2\2\u0312\u0313\b><\2"\r
+            + "\u0313~\3\2\2\2\u0314\u0315\7e\2\2\u0315\u0316\7q\2\2\u0316\u0317\7p\2"\r
+            + "\2\u0317\u0318\7v\2\2\u0318\u0319\7c\2\2\u0319\u031a\7k\2\2\u031a\u031b"\r
+            + "\7p\2\2\u031b\u031c\7g\2\2\u031c\u031d\7t\2\2\u031d\u031e\3\2\2\2\u031e"\r
+            + "\u031f\b?=\2\u031f\u0080\3\2\2\2\u0320\u0321\7e\2\2\u0321\u0322\7q\2\2"\r
+            + "\u0322\u0323\7p\2\2\u0323\u0324\7v\2\2\u0324\u0325\7c\2\2\u0325\u0326"\r
+            + "\7e\2\2\u0326\u0327\7v\2\2\u0327\u0328\3\2\2\2\u0328\u0329\b@>\2\u0329"\r
+            + "\u0082\3\2\2\2\u032a\u032b\7e\2\2\u032b\u032c\7q\2\2\u032c\u032d\7p\2"\r
+            + "\2\u032d\u032e\7h\2\2\u032e\u032f\7k\2\2\u032f\u0330\7i\2\2\u0330\u0331"\r
+            + "\3\2\2\2\u0331\u0332\bA?\2\u0332\u0084\3\2\2\2\u0333\u0334\7e\2\2\u0334"\r
+            + "\u0335\7j\2\2\u0335\u0336\7q\2\2\u0336\u0337\7k\2\2\u0337\u0338\7e\2\2"\r
+            + "\u0338\u0339\7g\2\2\u0339\u033a\3\2\2\2\u033a\u033b\bB@\2\u033b\u0086"\r
+            + "\3\2\2\2\u033c\u033d\7e\2\2\u033d\u033e\7c\2\2\u033e\u033f\7u\2\2\u033f"\r
+            + "\u0340\7g\2\2\u0340\u0341\3\2\2\2\u0341\u0342\bCA\2\u0342\u0088\3\2\2"\r
+            + "\2\u0343\u0344\7d\2\2\u0344\u0345\7k\2\2\u0345\u0346\7v\2\2\u0346\u0347"\r
+            + "\3\2\2\2\u0347\u0348\bDB\2\u0348\u008a\3\2\2\2\u0349\u034a\7d\2\2\u034a"\r
+            + "\u034b\7g\2\2\u034b\u034c\7n\2\2\u034c\u034d\7q\2\2\u034d\u034e\7p\2\2"\r
+            + "\u034e\u034f\7i\2\2\u034f\u0350\7u\2\2\u0350\u0351\7/\2\2\u0351\u0352"\r
+            + "\7v\2\2\u0352\u0353\7q\2\2\u0353\u0354\3\2\2\2\u0354\u0355\bEC\2\u0355"\r
+            + "\u008c\3\2\2\2\u0356\u0357\7d\2\2\u0357\u0358\7c\2\2\u0358\u0359\7u\2"\r
+            + "\2\u0359\u035a\7g\2\2\u035a\u035b\3\2\2\2\u035b\u035c\bFD\2\u035c\u008e"\r
+            + "\3\2\2\2\u035d\u035e\7c\2\2\u035e\u035f\7w\2\2\u035f\u0360\7i\2\2\u0360"\r
+            + "\u0361\7o\2\2\u0361\u0362\7g\2\2\u0362\u0363\7p\2\2\u0363\u0364\7v\2\2"\r
+            + "\u0364\u0365\3\2\2\2\u0365\u0366\bGE\2\u0366\u0090\3\2\2\2\u0367\u0368"\r
+            + "\7c\2\2\u0368\u0369\7t\2\2\u0369\u036a\7i\2\2\u036a\u036b\7w\2\2\u036b"\r
+            + "\u036c\7o\2\2\u036c\u036d\7g\2\2\u036d\u036e\7p\2\2\u036e\u036f\7v\2\2"\r
+            + "\u036f\u0370\3\2\2\2\u0370\u0371\bHF\2\u0371\u0092\3\2\2\2\u0372\u0373"\r
+            + "\7c\2\2\u0373\u0374\7p\2\2\u0374\u0375\7{\2\2\u0375\u0376\7z\2\2\u0376"\r
+            + "\u0377\7o\2\2\u0377\u0378\7n\2\2\u0378\u0379\3\2\2\2\u0379\u037a\bIG\2"\r
+            + "\u037a\u0094\3\2\2\2\u037b\u037f\t\4\2\2\u037c\u037e\t\5\2\2\u037d\u037c"\r
+            + "\3\2\2\2\u037e\u0381\3\2\2\2\u037f\u037d\3\2\2\2\u037f\u0380\3\2\2\2\u0380"\r
+            + "\u0382\3\2\2\2\u0381\u037f\3\2\2\2\u0382\u0383\bJH\2\u0383\u0096\3\2\2"\r
+            + "\2\u0384\u0387\7^\2\2\u0385\u0388\t\6\2\2\u0386\u0388\5\u0099L\2\u0387"\r
+            + "\u0385\3\2\2\2\u0387\u0386\3\2\2\2\u0388\u0098\3\2\2\2\u0389\u038a\7w"\r
+            + "\2\2\u038a\u038b\5\u009bM\2\u038b\u038c\5\u009bM\2\u038c\u038d\5\u009b"\r
+            + "M\2\u038d\u038e\5\u009bM\2\u038e\u009a\3\2\2\2\u038f\u0390\t\7\2\2\u0390"\r
+            + "\u009c\3\2\2\2\u0391\u0392\7=\2\2\u0392\u0393\3\2\2\2\u0393\u0394\bNI"\r
+            + "\2\u0394\u009e\3\2\2\2\u0395\u0396\7}\2\2\u0396\u0397\3\2\2\2\u0397\u0398"\r
+            + "\bOJ\2\u0398\u00a0\3\2\2\2\u0399\u039e\7$\2\2\u039a\u039d\5\u0097K\2\u039b"\r
+            + "\u039d\n\b\2\2\u039c\u039a\3\2\2\2\u039c\u039b\3\2\2\2\u039d\u03a0\3\2"\r
+            + "\2\2\u039e\u039c\3\2\2\2\u039e\u039f\3\2\2\2\u039f\u03a1\3\2\2\2\u03a0"\r
+            + "\u039e\3\2\2\2\u03a1\u03ac\7$\2\2\u03a2\u03a7\7)\2\2\u03a3\u03a6\5\u0097"\r
+            + "K\2\u03a4\u03a6\n\t\2\2\u03a5\u03a3\3\2\2\2\u03a5\u03a4\3\2\2\2\u03a6"\r
+            + "\u03a9\3\2\2\2\u03a7\u03a5\3\2\2\2\u03a7\u03a8\3\2\2\2\u03a8\u03aa\3\2"\r
+            + "\2\2\u03a9\u03a7\3\2\2\2\u03aa\u03ac\7)\2\2\u03ab\u0399\3\2\2\2\u03ab"\r
+            + "\u03a2\3\2\2\2\u03ac\u00a2\3\2\2\2\u03ad\u03b4\5\u00a1P\2\u03ae\u03b0"\r
+            + "\n\n\2\2\u03af\u03ae\3\2\2\2\u03b0\u03b1\3\2\2\2\u03b1\u03af\3\2\2\2\u03b1"\r
+            + "\u03b2\3\2\2\2\u03b2\u03b4\3\2\2\2\u03b3\u03ad\3\2\2\2\u03b3\u03af\3\2"\r
+            + "\2\2\u03b4\u03b5\3\2\2\2\u03b5\u03b6\bQK\2\u03b6\u00a4\3\2\2\2\u03b7\u03b8"\r
+            + "\t\13\2\2\u03b8\u03b9\3\2\2\2\u03b9\u03ba\bRL\2\u03ba\u00a6\3\2\2\2\u03bb"\r
+            + "\u03bc\7,\2\2\u03bc\u03bd\7\61\2\2\u03bd\u03be\3\2\2\2\u03be\u03bf\bS"\r
+            + "M\2\u03bf\u00a8\3\2\2\2\u03c0\u03c1\13\2\2\2\u03c1\u03c2\3\2\2\2\u03c2"\r
+            + "\u03c3\bTN\2\u03c3\u00aa\3\2\2\2\17\2\3\4\u00b9\u037f\u0387\u039c\u039e"\r
+            + "\u03a5\u03a7\u03ab\u03b1\u03b3";\r
     public static final ATN _ATN = ATNSimulator.deserialize(_serializedATN\r
             .toCharArray());\r
     static {\r
index 2b22fc7..91b0917 100644 (file)
@@ -7,21 +7,14 @@
  */\r
 package org.opendaylight.controller.antlrv4.code.gen;\r
 \r
-import java.util.List;\r
-\r
-import org.antlr.v4.runtime.NoViableAltException;\r
-import org.antlr.v4.runtime.Parser;\r
-import org.antlr.v4.runtime.ParserRuleContext;\r
-import org.antlr.v4.runtime.RecognitionException;\r
-import org.antlr.v4.runtime.TokenStream;\r
-import org.antlr.v4.runtime.atn.ATN;\r
-import org.antlr.v4.runtime.atn.ATNSimulator;\r
-import org.antlr.v4.runtime.atn.ParserATNSimulator;\r
-import org.antlr.v4.runtime.atn.PredictionContextCache;\r
+import org.antlr.v4.runtime.atn.*;\r
 import org.antlr.v4.runtime.dfa.DFA;\r
-import org.antlr.v4.runtime.tree.ParseTreeListener;\r
-import org.antlr.v4.runtime.tree.ParseTreeVisitor;\r
-import org.antlr.v4.runtime.tree.TerminalNode;\r
+import org.antlr.v4.runtime.*;\r
+import org.antlr.v4.runtime.misc.*;\r
+import org.antlr.v4.runtime.tree.*;\r
+import java.util.List;\r
+import java.util.Iterator;\r
+import java.util.ArrayList;\r
 \r
 @SuppressWarnings({ "all", "warnings", "unchecked", "unused", "cast" })\r
 public class YangParser extends Parser {\r
@@ -38,26 +31,26 @@ public class YangParser extends Parser {
             CONTAINER_KEYWORD = 62, DEVIATION_KEYWORD = 55,\r
             STATUS_KEYWORD = 18, IDENTITY_KEYWORD = 50, IDENTIFIER = 73,\r
             REFINE_KEYWORD = 23, USES_KEYWORD = 12, VALUE_KEYWORD = 11,\r
-            IMPORT_KEYWORD = 48, BLOCK_COMMENT = 7, INPUT_KEYWORD = 46,\r
-            IF_FEATURE_KEYWORD = 49, PLUS = 4, PATTERN_KEYWORD = 29,\r
-            LENGTH_KEYWORD = 42, FEATURE_KEYWORD = 53,\r
-            REQUIRE_INSTANCE_KEYWORD = 22, ORGANIZATION_KEYWORD = 32,\r
-            UNIQUE_KEYWORD = 14, SUBMODULE_KEYWORD = 17, TYPE_KEYWORD = 16,\r
-            RIGHT_BRACE = 3, ERROR_MESSAGE_KEYWORD = 57, LINE_COMMENT = 6,\r
-            OUTPUT_KEYWORD = 31, MIN_ELEMENTS_KEYWORD = 38, MUST_KEYWORD = 36,\r
-            SEMICOLON = 1, POSITION_KEYWORD = 28, PATH_KEYWORD = 30, S = 75,\r
-            KEY_KEYWORD = 45, EXTENSION_KEYWORD = 56, WS = 5,\r
+            IMPORT_KEYWORD = 48, INPUT_KEYWORD = 46, IF_FEATURE_KEYWORD = 49,\r
+            PLUS = 4, PATTERN_KEYWORD = 29, LENGTH_KEYWORD = 42,\r
+            FEATURE_KEYWORD = 53, REQUIRE_INSTANCE_KEYWORD = 22,\r
+            ORGANIZATION_KEYWORD = 32, UNIQUE_KEYWORD = 14,\r
+            SUBMODULE_KEYWORD = 17, TYPE_KEYWORD = 16, RIGHT_BRACE = 3,\r
+            ERROR_MESSAGE_KEYWORD = 57, LINE_COMMENT = 6, OUTPUT_KEYWORD = 31,\r
+            MIN_ELEMENTS_KEYWORD = 38, MUST_KEYWORD = 36, SEMICOLON = 1,\r
+            POSITION_KEYWORD = 28, PATH_KEYWORD = 30, S = 75, KEY_KEYWORD = 45,\r
+            EXTENSION_KEYWORD = 56, START_BLOCK_COMMENT = 7, WS = 5,\r
             MANDATORY_KEYWORD = 40, ORDERED_BY_KEYWORD = 33,\r
             ERROR_APP_TAG_KEYWORD = 58, INCLUDE_KEYWORD = 47,\r
             ANYXML_KEYWORD = 72, AUGMENT_KEYWORD = 70, DEVIATE_KEYWORD = 54,\r
             LEFT_BRACE = 2, YANG_VERSION_KEYWORD = 9, LIST_KEYWORD = 41,\r
             TYPEDEF_KEYWORD = 15, MAX_ELEMENTS_KEYWORD = 39, ENUM_KEYWORD = 59,\r
             CASE_KEYWORD = 66, UNITS_KEYWORD = 13, GROUPING_KEYWORD = 51,\r
-            BASE_KEYWORD = 69, RANGE_KEYWORD = 25,\r
+            END_BLOCK_COMMENT = 76, BASE_KEYWORD = 69, RANGE_KEYWORD = 25,\r
             FRACTION_DIGITS_KEYWORD = 52, CONFIG_KEYWORD = 64,\r
             BIT_KEYWORD = 67, STRING = 74;\r
     public static final String[] tokenNames = { "<INVALID>", "SEMICOLON",\r
-            "LEFT_BRACE", "'}'", "'+'", "WS", "LINE_COMMENT", "BLOCK_COMMENT",\r
+            "LEFT_BRACE", "'}'", "'+'", "WS", "LINE_COMMENT", "'/*'",\r
             "'yin-element'", "'yang-version'", "'when'", "'value'", "'uses'",\r
             "'units'", "'unique'", "'typedef'", "'type'", "'submodule'",\r
             "'status'", "'rpc'", "'revision-date'", "'revision'",\r
@@ -73,7 +66,7 @@ public class YangParser extends Parser {
             "'description'", "'default'", "'container'", "'contact'",\r
             "'config'", "'choice'", "'case'", "'bit'", "'belongs-to'",\r
             "'base'", "'augment'", "'argument'", "'anyxml'", "IDENTIFIER",\r
-            "STRING", "S" };\r
+            "STRING", "S", "'*/'" };\r
     public static final int RULE_yang = 0, RULE_string = 1,\r
             RULE_identifier_stmt = 2, RULE_stmtend = 3,\r
             RULE_deviate_replace_stmt = 4, RULE_deviate_delete_stmt = 5,\r
@@ -12858,7 +12851,7 @@ public class YangParser extends Parser {
         return _localctx;\r
     }\r
 \r
-    public static final String _serializedATN = "\2\3M\u04bd\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4"\r
+    public static final String _serializedATN = "\2\3N\u04bd\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4"\r
             + "\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20"\r
             + "\4\21\t\21\4\22\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27"\r
             + "\4\30\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36"\r
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/AugmentationSchemaBuilderImpl.java b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/AugmentationSchemaBuilderImpl.java
deleted file mode 100644 (file)
index 2ece5a0..0000000
+++ /dev/null
@@ -1,306 +0,0 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.model.parser.builder;\r
-\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import org.opendaylight.controller.model.parser.api.AugmentationSchemaBuilder;\r
-import org.opendaylight.controller.model.parser.api.DataSchemaNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.GroupingBuilder;\r
-import org.opendaylight.controller.model.parser.api.TypeDefinitionBuilder;\r
-import org.opendaylight.controller.model.parser.api.UsesNodeBuilder;\r
-import org.opendaylight.controller.model.parser.util.YangModelBuilderHelper;\r
-import org.opendaylight.controller.yang.common.QName;\r
-import org.opendaylight.controller.yang.model.api.AugmentationSchema;\r
-import org.opendaylight.controller.yang.model.api.DataSchemaNode;\r
-import org.opendaylight.controller.yang.model.api.GroupingDefinition;\r
-import org.opendaylight.controller.yang.model.api.SchemaPath;\r
-import org.opendaylight.controller.yang.model.api.Status;\r
-import org.opendaylight.controller.yang.model.api.TypeDefinition;\r
-import org.opendaylight.controller.yang.model.api.UsesNode;\r
-\r
-\r
-public class AugmentationSchemaBuilderImpl implements AugmentationSchemaBuilder {\r
-\r
-       private final AugmentationSchemaImpl instance;\r
-       private final SchemaPath augmentTarget;\r
-       final Set<DataSchemaNodeBuilder> childNodes = new HashSet<DataSchemaNodeBuilder>();\r
-       final Set<GroupingBuilder> groupings = new HashSet<GroupingBuilder>();\r
-       private final Set<UsesNodeBuilder> usesNodes = new HashSet<UsesNodeBuilder>();\r
-\r
-       AugmentationSchemaBuilderImpl(String augmentPath) {\r
-               SchemaPath targetPath = YangModelBuilderHelper.parsePath(augmentPath);\r
-               augmentTarget = targetPath;\r
-               instance = new AugmentationSchemaImpl(targetPath);\r
-       }\r
-\r
-       @Override\r
-       public void addChildNode(DataSchemaNodeBuilder childNode) {\r
-               childNodes.add(childNode);\r
-       }\r
-\r
-       @Override\r
-       public void addGrouping(GroupingBuilder grouping) {\r
-               groupings.add(grouping);\r
-       }\r
-\r
-       /**\r
-        * Always returns null.\r
-        */\r
-       @Override\r
-       public QName getQName() {\r
-               return null;\r
-       }\r
-\r
-       @Override\r
-       public AugmentationSchema build() {\r
-\r
-               // CHILD NODES\r
-               Map<QName, DataSchemaNode> childs = new HashMap<QName, DataSchemaNode>();\r
-               for(DataSchemaNodeBuilder node : childNodes) {\r
-                       childs.put(node.getQName(), node.build());\r
-               }\r
-               instance.setChildNodes(childs);\r
-\r
-               // GROUPINGS\r
-               Set<GroupingDefinition> groupingDefinitions = new HashSet<GroupingDefinition>();\r
-               for(GroupingBuilder builder : groupings) {\r
-                       groupingDefinitions.add(builder.build());\r
-               }\r
-               instance.setGroupings(groupingDefinitions);\r
-\r
-               // USES\r
-               Set<UsesNode> usesNodeDefinitions = new HashSet<UsesNode>();\r
-               for(UsesNodeBuilder builder : usesNodes) {\r
-                       usesNodeDefinitions.add(builder.build());\r
-               }\r
-               instance.setUses(usesNodeDefinitions);\r
-\r
-               return instance;\r
-       }\r
-\r
-       @Override\r
-       public void addUsesNode(UsesNodeBuilder usesBuilder) {\r
-               usesNodes.add(usesBuilder);\r
-       }\r
-\r
-       @Override\r
-       public void addTypedef(TypeDefinitionBuilder type) {\r
-               throw new UnsupportedOperationException("Augmentation can not contains type definitions");\r
-       }\r
-\r
-       @Override\r
-       public void setDescription(String description) {\r
-               instance.setDescription(description);\r
-       }\r
-\r
-       @Override\r
-       public void setReference(String reference) {\r
-               instance.setReference(reference);\r
-       }\r
-\r
-       @Override\r
-       public void setStatus(Status status) {\r
-               instance.setStatus(status);\r
-       }\r
-\r
-       @Override\r
-       public SchemaPath getTargetPath() {\r
-               return augmentTarget;\r
-       }\r
-\r
-\r
-       private static class AugmentationSchemaImpl implements AugmentationSchema {\r
-\r
-               private final SchemaPath targetPath;\r
-               private Map<QName, DataSchemaNode> childNodes;\r
-               private Set<GroupingDefinition> groupings;\r
-               private Set<UsesNode> uses;\r
-\r
-               private String description;\r
-               private String reference;\r
-               private Status status;\r
-\r
-               private AugmentationSchemaImpl(SchemaPath targetPath) {\r
-                       this.targetPath = targetPath;\r
-               }\r
-\r
-\r
-               @Override\r
-               public SchemaPath getTargetPath() {\r
-                       return targetPath;\r
-               }\r
-\r
-               @Override\r
-               public Set<DataSchemaNode> getChildNodes() {\r
-                       return new HashSet<DataSchemaNode>(childNodes.values());\r
-               }\r
-               private void setChildNodes(Map<QName, DataSchemaNode> childNodes) {\r
-                       this.childNodes = childNodes;\r
-               }\r
-\r
-               @Override\r
-               public Set<GroupingDefinition> getGroupings() {\r
-                       return groupings;\r
-               }\r
-               private void setGroupings(Set<GroupingDefinition> groupings) {\r
-                       this.groupings = groupings;\r
-               }\r
-\r
-               @Override\r
-               public Set<UsesNode> getUses() {\r
-                       return uses;\r
-               }\r
-               private void setUses(Set<UsesNode> uses) {\r
-                       this.uses = uses;\r
-               }\r
-\r
-               /**\r
-                * This method always returns null, because augmentation can not contains type definitions.\r
-                */\r
-               @Override\r
-               public Set<TypeDefinition<?>> getTypeDefinitions() {\r
-                       return null;\r
-               }\r
-\r
-               @Override\r
-               public String getDescription() {\r
-                       return description;\r
-               }\r
-               private void setDescription(String description) {\r
-                       this.description = description;\r
-               }\r
-\r
-               @Override\r
-               public String getReference() {\r
-                       return reference;\r
-               }\r
-               private void setReference(String reference) {\r
-                       this.reference = reference;\r
-               }\r
-\r
-               @Override\r
-               public Status getStatus() {\r
-                       return status;\r
-               }\r
-               private void setStatus(Status status) {\r
-                       this.status = status;\r
-               }\r
-\r
-               @Override\r
-               public DataSchemaNode getDataChildByName(QName name) {\r
-                       return childNodes.get(name);\r
-               }\r
-\r
-               @Override\r
-               public DataSchemaNode getDataChildByName(String name) {\r
-                       DataSchemaNode result = null;\r
-                       for(Map.Entry<QName, DataSchemaNode> entry : childNodes.entrySet()) {\r
-                               if(entry.getKey().getLocalName().equals(name)) {\r
-                                       result = entry.getValue();\r
-                                       break;\r
-                               }\r
-                       }\r
-                       return result;\r
-               }\r
-\r
-               @Override\r
-               public int hashCode() {\r
-                       final int prime = 17;\r
-            int result = 1;\r
-            result = prime * result + ((targetPath == null) ? 0 : targetPath.hashCode());\r
-            result = prime * result + ((childNodes == null) ? 0 : childNodes.hashCode());\r
-            result = prime * result + ((groupings == null) ? 0 : groupings.hashCode());\r
-            result = prime * result + ((uses == null) ? 0 : uses.hashCode());\r
-            result = prime * result + ((description == null) ? 0 : description.hashCode());\r
-            result = prime * result + ((reference == null) ? 0 : reference.hashCode());\r
-            result = prime * result + ((status == null) ? 0 : status.hashCode());\r
-            return result;\r
-               }\r
-\r
-               @Override\r
-        public boolean equals(Object obj) {\r
-            if (this == obj) {\r
-                return true;\r
-            }\r
-            if (obj == null) {\r
-                return false;\r
-            }\r
-            if (getClass() != obj.getClass()) {\r
-                return false;\r
-            }\r
-            AugmentationSchemaImpl other = (AugmentationSchemaImpl) obj;\r
-            if (targetPath == null) {\r
-                if (other.targetPath != null) {\r
-                    return false;\r
-                }\r
-            } else if (!targetPath.equals(other.targetPath)) {\r
-                return false;\r
-            }\r
-            if (childNodes == null) {\r
-                if (other.childNodes != null) {\r
-                    return false;\r
-                }\r
-            } else if (!childNodes.equals(other.childNodes)) {\r
-                return false;\r
-            }\r
-            if (groupings == null) {\r
-                if (other.groupings != null) {\r
-                    return false;\r
-                }\r
-            } else if (!groupings.equals(other.groupings)) {\r
-                return false;\r
-            }\r
-            if (uses == null) {\r
-                if (other.uses != null) {\r
-                    return false;\r
-                }\r
-            } else if (!uses.equals(other.uses)) {\r
-                return false;\r
-            }\r
-            if (description == null) {\r
-                if (other.description != null) {\r
-                    return false;\r
-                }\r
-            } else if (!description.equals(other.description)) {\r
-                return false;\r
-            }\r
-            if (reference == null) {\r
-                if (other.reference != null) {\r
-                    return false;\r
-                }\r
-            } else if (!reference.equals(other.reference)) {\r
-                return false;\r
-            }\r
-            if (status == null) {\r
-                if (other.status != null) {\r
-                    return false;\r
-                }\r
-            } else if (!status.equals(other.status)) {\r
-                return false;\r
-            }\r
-            return true;\r
-        }\r
-\r
-               @Override\r
-               public String toString() {\r
-                       StringBuilder sb = new StringBuilder(AugmentationSchemaImpl.class.getSimpleName());\r
-                       sb.append("[");\r
-                       sb.append("targetPath="+ targetPath);\r
-                       sb.append(", childNodes="+ childNodes.values());\r
-                       sb.append(", groupings="+ groupings);\r
-                       sb.append(", uses="+ uses);\r
-                       sb.append("]");\r
-                       return sb.toString();\r
-               }\r
-       }\r
-\r
-}\r
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/ContainerSchemaNodeBuilder.java b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/ContainerSchemaNodeBuilder.java
deleted file mode 100644 (file)
index 1651bfc..0000000
+++ /dev/null
@@ -1,468 +0,0 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.model.parser.builder;\r
-\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import org.opendaylight.controller.model.parser.api.AbstractChildNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.AugmentationTargetBuilder;\r
-import org.opendaylight.controller.model.parser.api.DataSchemaNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.GroupingBuilder;\r
-import org.opendaylight.controller.model.parser.api.TypeDefinitionAwareBuilder;\r
-import org.opendaylight.controller.model.parser.api.TypeDefinitionBuilder;\r
-import org.opendaylight.controller.model.parser.api.UsesNodeBuilder;\r
-import org.opendaylight.controller.yang.common.QName;\r
-import org.opendaylight.controller.yang.model.api.AugmentationSchema;\r
-import org.opendaylight.controller.yang.model.api.ConstraintDefinition;\r
-import org.opendaylight.controller.yang.model.api.ContainerSchemaNode;\r
-import org.opendaylight.controller.yang.model.api.DataSchemaNode;\r
-import org.opendaylight.controller.yang.model.api.ExtensionDefinition;\r
-import org.opendaylight.controller.yang.model.api.GroupingDefinition;\r
-import org.opendaylight.controller.yang.model.api.MustDefinition;\r
-import org.opendaylight.controller.yang.model.api.SchemaPath;\r
-import org.opendaylight.controller.yang.model.api.Status;\r
-import org.opendaylight.controller.yang.model.api.TypeDefinition;\r
-import org.opendaylight.controller.yang.model.api.UsesNode;\r
-\r
-\r
-public class ContainerSchemaNodeBuilder extends AbstractChildNodeBuilder implements TypeDefinitionAwareBuilder, MustAwareBuilder, AugmentationTargetBuilder, DataSchemaNodeBuilder {\r
-\r
-       private final ContainerSchemaNodeImpl instance;\r
-\r
-       private final Set<TypeDefinitionBuilder> addedTypedefs = new HashSet<TypeDefinitionBuilder>();\r
-       private final Set<AugmentationSchema> augmentations = new HashSet<AugmentationSchema>();\r
-       private final Set<UsesNodeBuilder> addedUsesNodes = new HashSet<UsesNodeBuilder>();\r
-       private MustDefinitionBuilder mustDefinitionBuilder;\r
-\r
-       ContainerSchemaNodeBuilder(QName qname) {\r
-               super(qname);\r
-               instance = new ContainerSchemaNodeImpl(qname);\r
-       }\r
-\r
-       @Override\r
-       public ContainerSchemaNode build() {\r
-               // CHILD NODES\r
-               Map<QName, DataSchemaNode> childs = new HashMap<QName, DataSchemaNode>();\r
-               for (DataSchemaNodeBuilder node : childNodes) {\r
-                       childs.put(node.getQName(), node.build());\r
-               }\r
-               instance.setChildNodes(childs);\r
-\r
-               // GROUPINGS\r
-               Set<GroupingDefinition> groupingDefinitions = new HashSet<GroupingDefinition>();\r
-               for (GroupingBuilder builder : groupings) {\r
-                       groupingDefinitions.add(builder.build());\r
-               }\r
-               instance.setGroupings(groupingDefinitions);\r
-\r
-               // TYPEDEFS\r
-               Set<TypeDefinition<?>> typedefs = new HashSet<TypeDefinition<?>>();\r
-               for(TypeDefinitionBuilder entry : addedTypedefs) {\r
-                       typedefs.add(entry.build());\r
-               }\r
-               instance.setTypeDefinitions(typedefs);\r
-\r
-               // USES\r
-               Set<UsesNode> uses = new HashSet<UsesNode>();\r
-               for (UsesNodeBuilder builder : addedUsesNodes) {\r
-                       uses.add(builder.build());\r
-               }\r
-               instance.setUses(uses);\r
-\r
-               // MUST definition\r
-               if(mustDefinitionBuilder != null) {\r
-                       MustDefinition md = mustDefinitionBuilder.build();\r
-                       instance.setMustStatement(md);\r
-               }\r
-\r
-               instance.setAvailableAugmentations(augmentations);\r
-\r
-               return instance;\r
-       }\r
-\r
-\r
-       @Override\r
-       public void addTypedef(TypeDefinitionBuilder type) {\r
-               addedTypedefs.add(type);\r
-       }\r
-\r
-       @Override\r
-       public void addAugmentation(AugmentationSchema augment) {\r
-               augmentations.add(augment);\r
-       }\r
-\r
-       @Override\r
-       public void setPath(SchemaPath schemaPath) {\r
-               instance.setPath(schemaPath);\r
-       }\r
-\r
-       @Override\r
-       public void setDescription(String description) {\r
-               instance.setDescription(description);\r
-       }\r
-\r
-       @Override\r
-       public void setReference(String reference) {\r
-               instance.setReference(reference);\r
-       }\r
-\r
-       @Override\r
-       public void setStatus(Status status) {\r
-               instance.setStatus(status);\r
-       }\r
-\r
-       @Override\r
-       public void setAugmenting(boolean augmenting) {\r
-               instance.setAugmenting(augmenting);\r
-       }\r
-\r
-       @Override\r
-       public void setConfiguration(boolean configuration) {\r
-               instance.setConfiguration(configuration);\r
-       }\r
-\r
-       public void setConstraints(ConstraintDefinition constraints) {\r
-               instance.setConstraints(constraints);\r
-       }\r
-\r
-       @Override\r
-       public void addUsesNode(UsesNodeBuilder usesNodeBuilder) {\r
-               addedUsesNodes.add(usesNodeBuilder);\r
-       }\r
-\r
-       public void setPresenceContainer(boolean presence) {\r
-               instance.setPresenceContainer(presence);\r
-       }\r
-\r
-       @Override\r
-       public void setMustDefinitionBuilder(MustDefinitionBuilder mustDefinitionBuilder) {\r
-               this.mustDefinitionBuilder = mustDefinitionBuilder;\r
-       }\r
-\r
-\r
-       private class ContainerSchemaNodeImpl implements ContainerSchemaNode {\r
-\r
-               private final QName qname;\r
-               private SchemaPath path;\r
-               private String description;\r
-               private String reference;\r
-               private Status status = Status.CURRENT;\r
-\r
-               private boolean augmenting;\r
-               private boolean configuration;\r
-               private ConstraintDefinition constraints;\r
-\r
-               private Set<AugmentationSchema> augmentations;\r
-\r
-               private Map<QName, DataSchemaNode> childNodes;\r
-               private Set<GroupingDefinition> groupings;\r
-               private Set<TypeDefinition<?>> typeDefinitions;\r
-\r
-               private Set<UsesNode> uses;\r
-               private boolean presence;\r
-\r
-               private MustDefinition mustDefinition;\r
-\r
-               private ContainerSchemaNodeImpl(QName qname) {\r
-                       this.qname = qname;\r
-               }\r
-\r
-               @Override\r
-               public QName getQName() {\r
-                       return qname;\r
-               }\r
-\r
-               @Override\r
-               public SchemaPath getPath() {\r
-                       return path;\r
-               }\r
-               private void setPath(SchemaPath path) {\r
-                       this.path = path;\r
-               }\r
-\r
-               @Override\r
-               public String getDescription() {\r
-                       return description;\r
-               }\r
-               private void setDescription(String description) {\r
-                       this.description = description;\r
-               }\r
-\r
-               @Override\r
-               public String getReference() {\r
-                       return reference;\r
-               }\r
-               private void setReference(String reference) {\r
-                       this.reference = reference;\r
-               }\r
-\r
-               @Override\r
-               public Status getStatus() {\r
-                       return status;\r
-               }\r
-               private void setStatus(Status status) {\r
-                       this.status = status;\r
-               }\r
-\r
-               @Override\r
-               public boolean isAugmenting() {\r
-                       return augmenting;\r
-               }\r
-               private void setAugmenting(boolean augmenting) {\r
-                       this.augmenting = augmenting;\r
-               }\r
-\r
-               @Override\r
-               public boolean isConfiguration() {\r
-                       return configuration;\r
-               }\r
-               private void setConfiguration(boolean configuration) {\r
-                       this.configuration = configuration;\r
-               }\r
-\r
-               @Override\r
-               public ConstraintDefinition getConstraints() {\r
-                       return constraints;\r
-               }\r
-               private void setConstraints(ConstraintDefinition constraints) {\r
-                       this.constraints = constraints;\r
-               }\r
-\r
-               @Override\r
-               public Set<AugmentationSchema> getAvailableAugmentations() {\r
-                       return augmentations;\r
-               }\r
-               private void setAvailableAugmentations(\r
-                               Set<AugmentationSchema> augmentations) {\r
-                       this.augmentations = augmentations;\r
-               }\r
-\r
-               @Override\r
-               public Set<DataSchemaNode> getChildNodes() {\r
-                       return new HashSet<DataSchemaNode>(childNodes.values());\r
-               }\r
-               private void setChildNodes(Map<QName, DataSchemaNode> childNodes) {\r
-                       this.childNodes = childNodes;\r
-               }\r
-\r
-               @Override\r
-               public Set<GroupingDefinition> getGroupings() {\r
-                       return groupings;\r
-               }\r
-               private void setGroupings(Set<GroupingDefinition> groupings) {\r
-                       this.groupings = groupings;\r
-               }\r
-\r
-               @Override\r
-               public DataSchemaNode getDataChildByName(QName name) {\r
-                       return childNodes.get(name);\r
-               }\r
-\r
-               @Override\r
-               public DataSchemaNode getDataChildByName(String name) {\r
-                       DataSchemaNode result = null;\r
-                       for (Map.Entry<QName, DataSchemaNode> entry : childNodes.entrySet()) {\r
-                               if (entry.getKey().getLocalName().equals(name)) {\r
-                                       result = entry.getValue();\r
-                                       break;\r
-                               }\r
-                       }\r
-                       return result;\r
-               }\r
-\r
-               @Override\r
-               public Set<UsesNode> getUses() {\r
-                       return uses;\r
-               }\r
-\r
-               private void setUses(Set<UsesNode> uses) {\r
-                       this.uses = uses;\r
-               }\r
-\r
-               @Override\r
-               public boolean isPresenceContainer() {\r
-                       return presence;\r
-               }\r
-\r
-               private void setPresenceContainer(boolean presence) {\r
-                       this.presence = presence;\r
-               }\r
-\r
-               @Override\r
-               public MustDefinition getMustDefinition() {\r
-                       return mustDefinition;\r
-               }\r
-               private void setMustStatement(MustDefinition mustDefinition) {\r
-                       this.mustDefinition = mustDefinition;\r
-               }\r
-\r
-               @Override\r
-               public Set<TypeDefinition<?>> getTypeDefinitions() {\r
-                       return typeDefinitions;\r
-               }\r
-               private void setTypeDefinitions(Set<TypeDefinition<?>> typeDefinitions) {\r
-                       this.typeDefinitions = typeDefinitions;\r
-               }\r
-\r
-               @Override\r
-               public List<ExtensionDefinition> getExtensionSchemaNodes() {\r
-                       // TODO Auto-generated method stub\r
-                       return null;\r
-               }\r
-\r
-\r
-               @Override\r
-        public int hashCode() {\r
-            final int prime = 31;\r
-            int result = 1;\r
-            result = prime * result + ((qname == null) ? 0 : qname.hashCode());\r
-            result = prime * result + ((path == null) ? 0 : path.hashCode());\r
-            result = prime * result + ((description == null) ? 0 : description.hashCode());\r
-            result = prime * result + ((reference == null) ? 0 : reference.hashCode());\r
-            result = prime * result + ((status == null) ? 0 : status.hashCode());\r
-            result = prime * result + (augmenting ? 1231 : 1237);\r
-            result = prime * result + (configuration ? 1231 : 1237);\r
-            result = prime * result + ((constraints == null) ? 0 : constraints.hashCode());\r
-            result = prime * result + ((augmentations == null) ? 0 : augmentations.hashCode());\r
-            result = prime * result + ((childNodes == null) ? 0 : childNodes.hashCode());\r
-            result = prime * result + ((groupings == null) ? 0 : groupings.hashCode());\r
-            result = prime * result + ((uses == null) ? 0 : uses.hashCode());\r
-            result = prime * result + (presence ? 1231 : 1237);\r
-            result = prime * result + ((mustDefinition == null) ? 0 : mustDefinition.hashCode());\r
-            return result;\r
-        }\r
-\r
-        @Override\r
-        public boolean equals(Object obj) {\r
-            if (this == obj) {\r
-                return true;\r
-            }\r
-            if (obj == null) {\r
-                return false;\r
-            }\r
-            if (getClass() != obj.getClass()) {\r
-                return false;\r
-            }\r
-            ContainerSchemaNodeImpl other = (ContainerSchemaNodeImpl) obj;\r
-            if (qname == null) {\r
-                if (other.qname != null) {\r
-                    return false;\r
-                }\r
-            } else if (!qname.equals(other.qname)) {\r
-                return false;\r
-            }\r
-            if (path == null) {\r
-                if (other.path != null) {\r
-                    return false;\r
-                }\r
-            } else if (!path.equals(other.path)) {\r
-                return false;\r
-            }\r
-            if (description == null) {\r
-                if (other.description != null) {\r
-                    return false;\r
-                }\r
-            } else if (!description.equals(other.description)) {\r
-                return false;\r
-            }\r
-            if (reference == null) {\r
-                if (other.reference != null) {\r
-                    return false;\r
-                }\r
-            } else if (!reference.equals(other.reference)) {\r
-                return false;\r
-            }\r
-            if (status == null) {\r
-                if (other.status != null) {\r
-                    return false;\r
-                }\r
-            } else if (!status.equals(other.status)) {\r
-                return false;\r
-            }\r
-            if(augmenting != other.augmenting) {\r
-               return false;\r
-            }\r
-            if(configuration != other.configuration) {\r
-               return false;\r
-            }\r
-            if (constraints == null) {\r
-                if (other.constraints != null) {\r
-                    return false;\r
-                }\r
-            } else if (!constraints.equals(other.constraints)) {\r
-                return false;\r
-            }\r
-            if (augmentations == null) {\r
-                if (other.augmentations != null) {\r
-                    return false;\r
-                }\r
-            } else if (!augmentations.equals(other.augmentations)) {\r
-                return false;\r
-            }\r
-            if (childNodes == null) {\r
-                if (other.childNodes != null) {\r
-                    return false;\r
-                }\r
-            } else if (!childNodes.equals(other.childNodes)) {\r
-                return false;\r
-            }\r
-            if (groupings == null) {\r
-                if (other.groupings != null) {\r
-                    return false;\r
-                }\r
-            } else if (!groupings.equals(other.groupings)) {\r
-                return false;\r
-            }\r
-            if (uses == null) {\r
-                if (other.uses != null) {\r
-                    return false;\r
-                }\r
-            } else if (!uses.equals(other.uses)) {\r
-                return false;\r
-            }\r
-               if(presence != other.presence) {\r
-               return false;\r
-            }\r
-               if (mustDefinition == null) {\r
-                if (other.mustDefinition != null) {\r
-                    return false;\r
-                }\r
-            } else if (!mustDefinition.equals(other.mustDefinition)) {\r
-                return false;\r
-            }\r
-            return true;\r
-        }\r
-\r
-               @Override\r
-               public String toString() {\r
-                       StringBuilder sb = new StringBuilder(\r
-                                       ContainerSchemaNodeImpl.class.getSimpleName());\r
-                       sb.append("[");\r
-                       sb.append("qname=" + qname);\r
-                       sb.append(", path=" + path);\r
-                       sb.append(", description=" + description);\r
-                       sb.append(", reference=" + reference);\r
-                       sb.append(", status=" + status);\r
-                       sb.append(", augmenting=" + augmenting);\r
-                       sb.append(", constraints=" + constraints);\r
-                       sb.append(", augmentations=" + augmentations);\r
-                       sb.append(", childNodes=" + childNodes.values());\r
-                       sb.append(", groupings=" + groupings);\r
-                       sb.append(", uses=" + uses);\r
-                       sb.append(", presence=" + presence);\r
-                       sb.append(", mustDefinition="+ mustDefinition);\r
-                       sb.append("]");\r
-                       return sb.toString();\r
-               }\r
-       }\r
-\r
-}
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/DeviationBuilder.java b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/DeviationBuilder.java
deleted file mode 100644 (file)
index abc6198..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.model.parser.builder;\r
-\r
-import org.opendaylight.controller.model.parser.api.Builder;\r
-import org.opendaylight.controller.model.parser.util.YangModelBuilderHelper;\r
-import org.opendaylight.controller.yang.model.api.Deviation;\r
-import org.opendaylight.controller.yang.model.api.MustDefinition;\r
-import org.opendaylight.controller.yang.model.api.SchemaPath;\r
-import org.opendaylight.controller.yang.model.api.Deviation.Deviate;\r
-\r
-\r
-public class DeviationBuilder implements MustAwareBuilder, Builder {\r
-\r
-       private final DeviationImpl instance;\r
-       private MustDefinitionBuilder mustDefinitionBuilder;\r
-\r
-       DeviationBuilder(String targetPathStr) {\r
-               SchemaPath targetPath = YangModelBuilderHelper.parsePath(targetPathStr);\r
-               instance = new DeviationImpl(targetPath);\r
-       }\r
-\r
-       @Override\r
-       public Deviation build() {\r
-               // MUST definition\r
-               if(mustDefinitionBuilder != null) {\r
-                       MustDefinition md = mustDefinitionBuilder.build();\r
-                       instance.setMustDefinition(md);\r
-               }\r
-               return instance;\r
-       }\r
-\r
-       public void setDeviate(String deviate) {\r
-               if(deviate.equals("not-supported")) {\r
-                       instance.setDeviate(Deviate.NOT_SUPPORTED);\r
-               } else if(deviate.equals("add")) {\r
-                       instance.setDeviate(Deviate.ADD);\r
-               } else if(deviate.equals("replace")) {\r
-                       instance.setDeviate(Deviate.REPLACE);\r
-               } else if(deviate.equals("delete")) {\r
-                       instance.setDeviate(Deviate.DELETE);\r
-               } else {\r
-                       throw new IllegalArgumentException("Unsupported type of 'deviate' statement: "+ deviate);\r
-               }\r
-       }\r
-\r
-       public void setReference(String reference) {\r
-               instance.setReference(reference);\r
-       }\r
-\r
-       @Override\r
-       public void setMustDefinitionBuilder(MustDefinitionBuilder mustDefinitionBuilder) {\r
-               this.mustDefinitionBuilder = mustDefinitionBuilder;\r
-       }\r
-\r
-       private static class DeviationImpl implements Deviation {\r
-\r
-               private SchemaPath targetPath;\r
-               private Deviate deviate;\r
-               private String reference;\r
-               private MustDefinition mustDefinition;\r
-\r
-               private DeviationImpl(SchemaPath targetPath) {\r
-                       this.targetPath = targetPath;\r
-               }\r
-\r
-               @Override\r
-               public SchemaPath getTargetPath() {\r
-                       return targetPath;\r
-               }\r
-\r
-               @Override\r
-               public Deviate getDeviate() {\r
-                       return deviate;\r
-               }\r
-               private void setDeviate(Deviate deviate) {\r
-                       this.deviate = deviate;\r
-               }\r
-\r
-               @Override\r
-               public String getReference() {\r
-                       return reference;\r
-               }\r
-               private void setReference(String reference) {\r
-                       this.reference = reference;\r
-               }\r
-\r
-               @Override\r
-               public String toString() {\r
-                       return DeviationImpl.class.getSimpleName() +"[targetPath="+ targetPath +", deviate="+ deviate +", reference="+ reference +", mustDefinition="+ mustDefinition +"]";\r
-               }\r
-\r
-               @Override\r
-               public MustDefinition getMustDefinition() {\r
-                       return mustDefinition;\r
-               }\r
-               private void setMustDefinition(MustDefinition mustDefinition) {\r
-                       this.mustDefinition = mustDefinition;\r
-               }\r
-\r
-       }\r
-\r
-}\r
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/FeatureBuilder.java b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/FeatureBuilder.java
deleted file mode 100644 (file)
index e91d2fb..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.model.parser.builder;\r
-\r
-import java.util.List;\r
-\r
-import org.opendaylight.controller.model.parser.api.SchemaNodeBuilder;\r
-import org.opendaylight.controller.yang.common.QName;\r
-import org.opendaylight.controller.yang.model.api.ExtensionDefinition;\r
-import org.opendaylight.controller.yang.model.api.FeatureDefinition;\r
-import org.opendaylight.controller.yang.model.api.SchemaNode;\r
-import org.opendaylight.controller.yang.model.api.SchemaPath;\r
-import org.opendaylight.controller.yang.model.api.Status;\r
-\r
-\r
-public class FeatureBuilder implements SchemaNodeBuilder {\r
-\r
-       private final FeatureDefinitionImpl instance;\r
-       private final QName qname;\r
-\r
-       FeatureBuilder(QName qname) {\r
-               this.qname = qname;\r
-               instance = new FeatureDefinitionImpl(qname);\r
-       }\r
-\r
-       @Override\r
-       public SchemaNode build() {\r
-               return instance;\r
-       }\r
-\r
-       @Override\r
-       public QName getQName() {\r
-               return qname;\r
-       }\r
-\r
-       @Override\r
-       public void setPath(SchemaPath path) {\r
-               instance.setPath(path);\r
-       }\r
-\r
-       @Override\r
-       public void setDescription(String description) {\r
-               instance.setDescription(description);\r
-       }\r
-\r
-       @Override\r
-       public void setReference(String reference) {\r
-               instance.setReference(reference);\r
-       }\r
-\r
-       @Override\r
-       public void setStatus(Status status) {\r
-               instance.setStatus(status);\r
-       }\r
-\r
-       private static class FeatureDefinitionImpl implements FeatureDefinition {\r
-\r
-               private final QName qname;\r
-               private SchemaPath path;\r
-               private String description;\r
-               private String reference;\r
-               private Status status;\r
-\r
-               private FeatureDefinitionImpl(QName qname) {\r
-                       this.qname = qname;\r
-               }\r
-\r
-               @Override\r
-               public QName getQName() {\r
-                       return qname;\r
-               }\r
-\r
-               @Override\r
-               public SchemaPath getPath() {\r
-                       return path;\r
-               }\r
-               private void setPath(SchemaPath path) {\r
-                       this.path = path;;\r
-               }\r
-\r
-               @Override\r
-               public String getDescription() {\r
-                       return description;\r
-               }\r
-               private void setDescription(String description) {\r
-                       this.description = description;\r
-               }\r
-\r
-               @Override\r
-               public String getReference() {\r
-                       return reference;\r
-               }\r
-               private void setReference(String reference) {\r
-                       this.reference = reference;\r
-               }\r
-\r
-               @Override\r
-               public Status getStatus() {\r
-                       return status;\r
-               }\r
-               private void setStatus(Status status) {\r
-                       this.status = status;\r
-               }\r
-\r
-               @Override\r
-               public List<ExtensionDefinition> getExtensionSchemaNodes() {\r
-                       // TODO Auto-generated method stub\r
-                       return null;\r
-               }\r
-\r
-               @Override\r
-        public int hashCode() {\r
-            final int prime = 31;\r
-            int result = 1;\r
-            result = prime * result + ((qname == null) ? 0 : qname.hashCode());\r
-            result = prime * result + ((path == null) ? 0 : path.hashCode());\r
-            result = prime * result + ((description == null) ? 0 : description.hashCode());\r
-            result = prime * result + ((reference == null) ? 0 : reference.hashCode());\r
-            result = prime * result + ((status == null) ? 0 : status.hashCode());\r
-            return result;\r
-        }\r
-\r
-        @Override\r
-        public boolean equals(Object obj) {\r
-            if (this == obj) {\r
-                return true;\r
-            }\r
-            if (obj == null) {\r
-                return false;\r
-            }\r
-            if (getClass() != obj.getClass()) {\r
-                return false;\r
-            }\r
-            FeatureDefinitionImpl other = (FeatureDefinitionImpl) obj;\r
-            if (qname == null) {\r
-                if (other.qname != null) {\r
-                    return false;\r
-                }\r
-            } else if (!qname.equals(other.qname)) {\r
-                return false;\r
-            }\r
-            if (path == null) {\r
-                if (other.path != null) {\r
-                    return false;\r
-                }\r
-            } else if (!path.equals(other.path)) {\r
-                return false;\r
-            }\r
-            if (description == null) {\r
-                if (other.description != null) {\r
-                    return false;\r
-                }\r
-            } else if (!description.equals(other.description)) {\r
-                return false;\r
-            }\r
-            if (reference == null) {\r
-                if (other.reference != null) {\r
-                    return false;\r
-                }\r
-            } else if (!reference.equals(other.reference)) {\r
-                return false;\r
-            }\r
-            if (status == null) {\r
-                if (other.status != null) {\r
-                    return false;\r
-                }\r
-            } else if (!status.equals(other.status)) {\r
-                return false;\r
-            }\r
-            return true;\r
-        }\r
-\r
-               @Override\r
-               public String toString() {\r
-                       StringBuilder sb = new StringBuilder(FeatureDefinitionImpl.class.getSimpleName());\r
-                       sb.append("[name="+ qname);\r
-                       sb.append(", path="+ path);\r
-                       sb.append(", description="+ description);\r
-                       sb.append(", reference="+ reference);\r
-                       sb.append(", status="+ status +"]");\r
-                       return sb.toString();\r
-               }\r
-       }\r
-\r
-}\r
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/GroupingBuilderImpl.java b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/GroupingBuilderImpl.java
deleted file mode 100644 (file)
index 5ffe307..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.model.parser.builder;\r
-\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import org.opendaylight.controller.model.parser.api.DataSchemaNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.GroupingBuilder;\r
-import org.opendaylight.controller.model.parser.api.TypeDefinitionBuilder;\r
-import org.opendaylight.controller.model.parser.api.UsesNodeBuilder;\r
-import org.opendaylight.controller.yang.common.QName;\r
-import org.opendaylight.controller.yang.model.api.DataSchemaNode;\r
-import org.opendaylight.controller.yang.model.api.ExtensionDefinition;\r
-import org.opendaylight.controller.yang.model.api.GroupingDefinition;\r
-import org.opendaylight.controller.yang.model.api.SchemaPath;\r
-import org.opendaylight.controller.yang.model.api.Status;\r
-import org.opendaylight.controller.yang.model.api.TypeDefinition;\r
-import org.opendaylight.controller.yang.model.api.UsesNode;\r
-\r
-\r
-public class GroupingBuilderImpl implements GroupingBuilder {\r
-\r
-       private final GroupingDefinitionImpl instance;\r
-       private final Set<DataSchemaNodeBuilder> childNodes = new HashSet<DataSchemaNodeBuilder>();\r
-       private final Set<GroupingBuilder> groupings = new HashSet<GroupingBuilder>();\r
-       private final Set<TypeDefinitionBuilder> addedTypedefs = new HashSet<TypeDefinitionBuilder>();\r
-       private final Set<UsesNodeBuilder> usesNodes = new HashSet<UsesNodeBuilder>();\r
-\r
-       GroupingBuilderImpl(QName qname) {\r
-               this.instance = new GroupingDefinitionImpl(qname);\r
-       }\r
-\r
-       @Override\r
-       public GroupingDefinition build() {\r
-               // CHILD NODES\r
-               Map<QName, DataSchemaNode> childs = new HashMap<QName, DataSchemaNode>();\r
-               for(DataSchemaNodeBuilder node : childNodes) {\r
-                       childs.put(node.getQName(), node.build());\r
-               }\r
-               instance.setChildNodes(childs);\r
-\r
-               // GROUPINGS\r
-               Set<GroupingDefinition> groupingDefinitions = new HashSet<GroupingDefinition>();\r
-               for(GroupingBuilder builder : groupings) {\r
-                       groupingDefinitions.add(builder.build());\r
-               }\r
-               instance.setGroupings(groupingDefinitions);\r
-\r
-               // TYPEDEFS\r
-               Set<TypeDefinition<?>> typedefs = new HashSet<TypeDefinition<?>>();\r
-               for (TypeDefinitionBuilder entry : addedTypedefs) {\r
-                       typedefs.add(entry.build());\r
-               }\r
-               instance.setTypeDefinitions(typedefs);\r
-\r
-               // USES\r
-               Set<UsesNode> usesNodeDefinitions = new HashSet<UsesNode>();\r
-               for(UsesNodeBuilder builder : usesNodes) {\r
-                       usesNodeDefinitions.add(builder.build());\r
-               }\r
-               instance.setUses(usesNodeDefinitions);\r
-\r
-               return instance;\r
-       }\r
-\r
-       @Override\r
-       public void addTypedef(TypeDefinitionBuilder type) {\r
-               addedTypedefs.add(type);\r
-       }\r
-       @Override\r
-       public void setPath(SchemaPath schemaPath) {\r
-               instance.setPath(schemaPath);\r
-       }\r
-       @Override\r
-       public void setDescription(String description) {\r
-               instance.setDescription(description);\r
-       }\r
-       @Override\r
-       public void setReference(String reference) {\r
-               instance.setReference(reference);\r
-       }\r
-       @Override\r
-       public void setStatus(Status status) {\r
-               instance.setStatus(status);\r
-       }\r
-\r
-       @Override\r
-       public void addChildNode(DataSchemaNodeBuilder childNode) {\r
-               childNodes.add(childNode);\r
-       }\r
-\r
-       @Override\r
-       public void addGrouping(GroupingBuilder grouping) {\r
-               groupings.add(grouping);\r
-       }\r
-\r
-       @Override\r
-       public void addUsesNode(UsesNodeBuilder usesBuilder) {\r
-               usesNodes.add(usesBuilder);\r
-       }\r
-\r
-\r
-\r
-       private static class GroupingDefinitionImpl implements GroupingDefinition {\r
-\r
-               private final QName qname;\r
-               private SchemaPath path;\r
-               private String description;\r
-               private String reference;\r
-               private Status status;\r
-\r
-               private Map<QName, DataSchemaNode> childNodes;\r
-               private Set<GroupingDefinition> groupings;\r
-               private Set<TypeDefinition<?>> typeDefinitions;\r
-               private Set<UsesNode> uses;\r
-\r
-               private GroupingDefinitionImpl(QName qname) {\r
-                       this.qname = qname;\r
-               }\r
-\r
-               @Override\r
-               public QName getQName() {\r
-                       return qname;\r
-               }\r
-\r
-               @Override\r
-               public SchemaPath getPath() {\r
-                       return path;\r
-               }\r
-               private void setPath(SchemaPath path) {\r
-                       this.path = path;\r
-               }\r
-\r
-               @Override\r
-               public String getDescription() {\r
-                       return description;\r
-               }\r
-               private void setDescription(String description) {\r
-                       this.description = description;\r
-               }\r
-\r
-               @Override\r
-               public String getReference() {\r
-                       return reference;\r
-               }\r
-               private void setReference(String reference) {\r
-                       this.reference = reference;\r
-               }\r
-\r
-               @Override\r
-               public Status getStatus() {\r
-                       return status;\r
-               }\r
-               private void setStatus(Status status) {\r
-                       this.status = status;\r
-               }\r
-\r
-               @Override\r
-               public Set<DataSchemaNode> getChildNodes() {\r
-                       return new HashSet<DataSchemaNode>(childNodes.values());\r
-               }\r
-               private void setChildNodes(Map<QName, DataSchemaNode> childNodes) {\r
-                       this.childNodes = childNodes;\r
-               }\r
-\r
-               @Override\r
-               public Set<GroupingDefinition> getGroupings() {\r
-                       return groupings;\r
-               }\r
-               private void setGroupings(Set<GroupingDefinition> groupings) {\r
-                       this.groupings = groupings;\r
-               }\r
-\r
-               @Override\r
-               public Set<UsesNode> getUses() {\r
-                       return uses;\r
-               }\r
-               private void setUses(Set<UsesNode> uses) {\r
-                       this.uses = uses;\r
-               }\r
-\r
-               @Override\r
-               public Set<TypeDefinition<?>> getTypeDefinitions() {\r
-                       return typeDefinitions;\r
-               }\r
-               private void setTypeDefinitions(Set<TypeDefinition<?>> typeDefinitions) {\r
-                       this.typeDefinitions = typeDefinitions;\r
-               }\r
-\r
-               @Override\r
-               public List<ExtensionDefinition> getExtensionSchemaNodes() {\r
-                       // TODO Auto-generated method stub\r
-                       return null;\r
-               }\r
-\r
-               @Override\r
-               public DataSchemaNode getDataChildByName(QName name) {\r
-                       return childNodes.get(name);\r
-               }\r
-\r
-               @Override\r
-               public DataSchemaNode getDataChildByName(String name) {\r
-                       DataSchemaNode result = null;\r
-                       for(Map.Entry<QName, DataSchemaNode> entry : childNodes.entrySet()) {\r
-                               if(entry.getKey().getLocalName().equals(name)) {\r
-                                       result = entry.getValue();\r
-                                       break;\r
-                               }\r
-                       }\r
-                       return result;\r
-               }\r
-\r
-               @Override\r
-               public String toString() {\r
-                       StringBuilder sb = new StringBuilder();\r
-                       sb.append(GroupingDefinitionImpl.class.getSimpleName() +"[\n");\r
-                       sb.append("qname="+ qname +", \n");\r
-                       sb.append("path="+ path +", \n");\r
-                       sb.append("description="+ description +", \n");\r
-                       sb.append("reference="+ reference +", \n");\r
-                       sb.append("status="+ status +", \n");\r
-                       sb.append("childNodes="+ childNodes.values() +", \n");\r
-                       sb.append("groupings="+ groupings +"]");\r
-                       return sb.toString();\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Always returns null.\r
-        */\r
-       @Override\r
-       public QName getQName() {\r
-               return null;\r
-       }\r
-\r
-}\r
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/LeafListSchemaNodeBuilder.java b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/LeafListSchemaNodeBuilder.java
deleted file mode 100644 (file)
index f2ea8ca..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.model.parser.builder;\r
-\r
-import java.util.List;\r
-\r
-import org.opendaylight.controller.model.parser.api.DataSchemaNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.SchemaNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.TypeAwareBuilder;\r
-import org.opendaylight.controller.yang.common.QName;\r
-import org.opendaylight.controller.yang.model.api.ConstraintDefinition;\r
-import org.opendaylight.controller.yang.model.api.DataSchemaNode;\r
-import org.opendaylight.controller.yang.model.api.ExtensionDefinition;\r
-import org.opendaylight.controller.yang.model.api.LeafListSchemaNode;\r
-import org.opendaylight.controller.yang.model.api.MustDefinition;\r
-import org.opendaylight.controller.yang.model.api.SchemaPath;\r
-import org.opendaylight.controller.yang.model.api.Status;\r
-import org.opendaylight.controller.yang.model.api.TypeDefinition;\r
-\r
-\r
-public class LeafListSchemaNodeBuilder implements SchemaNodeBuilder, TypeAwareBuilder, MustAwareBuilder, DataSchemaNodeBuilder {\r
-\r
-               private final LeafListSchemaNodeImpl instance;\r
-               private final QName qname;\r
-               private TypeDefinition<?> type;\r
-               private MustDefinitionBuilder mustDefinitionBuilder;\r
-\r
-               LeafListSchemaNodeBuilder(QName qname) {\r
-                       this.qname = qname;\r
-                       instance = new LeafListSchemaNodeImpl(qname);\r
-               }\r
-\r
-\r
-               @Override\r
-               public DataSchemaNode build() {\r
-                       if(mustDefinitionBuilder != null) {\r
-                               MustDefinition mustDefinition = mustDefinitionBuilder.build();\r
-                               instance.setMustDefinition(mustDefinition);\r
-                       }\r
-                       return instance;\r
-               }\r
-\r
-               @Override\r
-               public QName getQName() {\r
-                       return qname;\r
-               }\r
-\r
-               @Override\r
-               public void setPath(SchemaPath path) {\r
-                       instance.setPath(path);\r
-               }\r
-\r
-               @Override\r
-               public void setDescription(String description) {\r
-                       instance.setDescription(description);\r
-               }\r
-\r
-               @Override\r
-               public void setReference(String reference) {\r
-                       instance.setReference(reference);\r
-               }\r
-\r
-               @Override\r
-               public void setStatus(Status status) {\r
-                       instance.setStatus(status);\r
-               }\r
-\r
-               @Override\r
-               public TypeDefinition<?> getType() {\r
-                       return type;\r
-               }\r
-\r
-               @Override\r
-               public void setType(TypeDefinition<?> type) {\r
-                       this.type = type;\r
-                       instance.setType(type);\r
-               }\r
-\r
-               @Override\r
-               public void setMustDefinitionBuilder(MustDefinitionBuilder mustDefinitionBuilder) {\r
-                       this.mustDefinitionBuilder = mustDefinitionBuilder;\r
-               }\r
-\r
-               public void setAugmenting(boolean augmenting) {\r
-                       instance.setAugmenting(augmenting);\r
-               }\r
-               public void setConfiguration(boolean configuration) {\r
-                       instance.setConfiguration(configuration);\r
-               }\r
-               public void setConstraints(ConstraintDefinition constraints) {\r
-                       instance.setConstraints(constraints);\r
-               }\r
-               public void setUserOrdered(boolean userOrdered) {\r
-                       instance.setUserOrdered(userOrdered);\r
-               }\r
-\r
-\r
-               private class LeafListSchemaNodeImpl implements LeafListSchemaNode {\r
-                       private final QName qname;\r
-                       private SchemaPath path;\r
-                       private String description;\r
-                       private String reference;\r
-                       private Status status = Status.CURRENT;\r
-\r
-                       private boolean augmenting;\r
-                       private boolean configuration;\r
-                       private ConstraintDefinition constraints;\r
-\r
-                       private TypeDefinition<?> type;\r
-                       private boolean userOrdered;\r
-\r
-                       private MustDefinition mustDefinition;\r
-\r
-                       private LeafListSchemaNodeImpl(QName qname) {\r
-                               this.qname = qname;\r
-                       }\r
-\r
-\r
-                       @Override\r
-                       public QName getQName() {\r
-                               return qname;\r
-                       }\r
-\r
-                       @Override\r
-                       public SchemaPath getPath() {\r
-                               return path;\r
-                       }\r
-                       private void setPath(SchemaPath path) {\r
-                               this.path = path;;\r
-                       }\r
-\r
-                       @Override\r
-                       public String getDescription() {\r
-                               return description;\r
-                       }\r
-                       private void setDescription(String description) {\r
-                               this.description = description;\r
-                       }\r
-\r
-                       @Override\r
-                       public String getReference() {\r
-                               return reference;\r
-                       }\r
-                       private void setReference(String reference) {\r
-                               this.reference = reference;\r
-                       }\r
-\r
-                       @Override\r
-                       public Status getStatus() {\r
-                               return status;\r
-                       }\r
-                       private void setStatus(Status status) {\r
-                               this.status = status;\r
-                       }\r
-\r
-                       @Override\r
-                       public boolean isAugmenting() {\r
-                               return augmenting;\r
-                       }\r
-                       private void setAugmenting(boolean augmenting) {\r
-                               this.augmenting = augmenting;\r
-                       }\r
-\r
-                       @Override\r
-                       public boolean isConfiguration() {\r
-                               return configuration;\r
-                       }\r
-                       private void setConfiguration(boolean configuration) {\r
-                               this.configuration = configuration;\r
-                       }\r
-\r
-                       @Override\r
-                       public ConstraintDefinition getConstraints() {\r
-                               return constraints;\r
-                       }\r
-                       private void setConstraints(ConstraintDefinition constraints) {\r
-                               this.constraints = constraints;\r
-                       }\r
-\r
-                       @Override\r
-                       public TypeDefinition<?> getType() {\r
-                               return type;\r
-                       }\r
-                       public void setType(TypeDefinition<? extends TypeDefinition<?>> type) {\r
-                               this.type = type;\r
-                       }\r
-\r
-                       @Override\r
-                       public boolean isUserOrdered() {\r
-                               return userOrdered;\r
-                       }\r
-                       private void setUserOrdered(boolean userOrdered) {\r
-                               this.userOrdered = userOrdered;\r
-                       }\r
-\r
-                       @Override\r
-                       public MustDefinition getMustDefinition() {\r
-                               return mustDefinition;\r
-                       }\r
-                       private void setMustDefinition(MustDefinition mustDefinition) {\r
-                               this.mustDefinition = mustDefinition;\r
-                       }\r
-\r
-                       @Override\r
-                       public List<ExtensionDefinition> getExtensionSchemaNodes() {\r
-                               // TODO Auto-generated method stub\r
-                               return null;\r
-                       }\r
-\r
-                       @Override\r
-                       public String toString() {\r
-                               return LeafListSchemaNodeImpl.class.getSimpleName() +"[qname="+ qname +", type="+ type +"]";\r
-                       }\r
-               }\r
-\r
-       }
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/LeafSchemaNodeBuilder.java b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/LeafSchemaNodeBuilder.java
deleted file mode 100644 (file)
index f50ac8a..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.model.parser.builder;\r
-\r
-import java.util.List;\r
-\r
-import org.opendaylight.controller.model.parser.api.DataSchemaNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.SchemaNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.TypeAwareBuilder;\r
-import org.opendaylight.controller.yang.common.QName;\r
-import org.opendaylight.controller.yang.model.api.ConstraintDefinition;\r
-import org.opendaylight.controller.yang.model.api.ExtensionDefinition;\r
-import org.opendaylight.controller.yang.model.api.LeafSchemaNode;\r
-import org.opendaylight.controller.yang.model.api.MustDefinition;\r
-import org.opendaylight.controller.yang.model.api.SchemaPath;\r
-import org.opendaylight.controller.yang.model.api.Status;\r
-import org.opendaylight.controller.yang.model.api.TypeDefinition;\r
-\r
-\r
-public class LeafSchemaNodeBuilder implements DataSchemaNodeBuilder,\r
-               SchemaNodeBuilder, TypeAwareBuilder, MustAwareBuilder {\r
-\r
-       private final QName qname;\r
-       private final LeafSchemaNodeImpl instance;\r
-       private TypeDefinition<?> type;\r
-       private MustDefinitionBuilder mustDefinitionBuilder;\r
-\r
-       LeafSchemaNodeBuilder(QName qname) {\r
-               this.qname = qname;\r
-               instance = new LeafSchemaNodeImpl(qname);\r
-       }\r
-\r
-       @Override\r
-       public LeafSchemaNode build() {\r
-               if (mustDefinitionBuilder != null) {\r
-                       MustDefinition mustDefinition = mustDefinitionBuilder.build();\r
-                       instance.setMustDefinition(mustDefinition);\r
-               }\r
-               return instance;\r
-       }\r
-\r
-       @Override\r
-       public QName getQName() {\r
-               return qname;\r
-       }\r
-\r
-       @Override\r
-       public void setPath(SchemaPath path) {\r
-               instance.setPath(path);\r
-       }\r
-\r
-       @Override\r
-       public void setDescription(String description) {\r
-               instance.setDescription(description);\r
-       }\r
-\r
-       @Override\r
-       public void setReference(String reference) {\r
-               instance.setReference(reference);\r
-       }\r
-\r
-       @Override\r
-       public void setStatus(Status status) {\r
-               instance.setStatus(status);\r
-       }\r
-\r
-       public void setAugmenting(boolean augmenting) {\r
-               instance.setAugmenting(augmenting);\r
-       }\r
-\r
-       public void setConfiguration(boolean configuration) {\r
-               instance.setConfiguration(configuration);\r
-       }\r
-\r
-       public void setConstraints(ConstraintDefinition constraints) {\r
-               instance.setConstraints(constraints);\r
-       }\r
-\r
-       @Override\r
-       public TypeDefinition<?> getType() {\r
-               return type;\r
-       }\r
-\r
-       @Override\r
-       public void setType(TypeDefinition<?> type) {\r
-               this.type = type;\r
-               instance.setType(type);\r
-       }\r
-\r
-       @Override\r
-       public void setMustDefinitionBuilder(\r
-                       MustDefinitionBuilder mustDefinitionBuilder) {\r
-               this.mustDefinitionBuilder = mustDefinitionBuilder;\r
-       }\r
-\r
-       private class LeafSchemaNodeImpl implements LeafSchemaNode {\r
-               private final QName qname;\r
-               private SchemaPath path;\r
-               private String description;\r
-               private String reference;\r
-               private Status status = Status.CURRENT;\r
-\r
-               private boolean augmenting;\r
-               private boolean configuration;\r
-               private ConstraintDefinition constraints;\r
-\r
-               private TypeDefinition<?> type;\r
-               private MustDefinition mustDefinition;\r
-\r
-               private LeafSchemaNodeImpl(QName qname) {\r
-                       this.qname = qname;\r
-               }\r
-\r
-               @Override\r
-               public QName getQName() {\r
-                       return qname;\r
-               }\r
-\r
-               @Override\r
-               public SchemaPath getPath() {\r
-                       return path;\r
-               }\r
-\r
-               private void setPath(SchemaPath path) {\r
-                       this.path = path;\r
-               }\r
-\r
-               @Override\r
-               public String getDescription() {\r
-                       return description;\r
-               }\r
-\r
-               private void setDescription(String description) {\r
-                       this.description = description;\r
-               }\r
-\r
-               @Override\r
-               public String getReference() {\r
-                       return reference;\r
-               }\r
-\r
-               private void setReference(String reference) {\r
-                       this.reference = reference;\r
-               }\r
-\r
-               @Override\r
-               public Status getStatus() {\r
-                       return status;\r
-               }\r
-\r
-               private void setStatus(Status status) {\r
-                       if (status != null) {\r
-                               this.status = status;\r
-                       }\r
-               }\r
-\r
-               @Override\r
-               public boolean isAugmenting() {\r
-                       return augmenting;\r
-               }\r
-\r
-               private void setAugmenting(boolean augmenting) {\r
-                       this.augmenting = augmenting;\r
-               }\r
-\r
-               @Override\r
-               public boolean isConfiguration() {\r
-                       return configuration;\r
-               }\r
-\r
-               private void setConfiguration(boolean configuration) {\r
-                       this.configuration = configuration;\r
-               }\r
-\r
-               @Override\r
-               public ConstraintDefinition getConstraints() {\r
-                       return constraints;\r
-               }\r
-\r
-               private void setConstraints(ConstraintDefinition constraints) {\r
-                       this.constraints = constraints;\r
-               }\r
-\r
-               @Override\r
-               public TypeDefinition<?> getType() {\r
-                       return type;\r
-               }\r
-\r
-               private void setType(TypeDefinition<? extends TypeDefinition<?>> type) {\r
-                       this.type = type;\r
-               }\r
-\r
-               @Override\r
-               public MustDefinition getMustDefinition() {\r
-                       return mustDefinition;\r
-               }\r
-\r
-               private void setMustDefinition(MustDefinition mustDefinition) {\r
-                       this.mustDefinition = mustDefinition;\r
-               }\r
-\r
-               @Override\r
-               public List<ExtensionDefinition> getExtensionSchemaNodes() {\r
-                       // TODO Auto-generated method stub\r
-                       return null;\r
-               }\r
-\r
-               @Override\r
-               public String toString() {\r
-                       StringBuilder sb = new StringBuilder(\r
-                                       LeafSchemaNodeImpl.class.getSimpleName());\r
-                       sb.append("[");\r
-                       sb.append("qname=" + qname);\r
-                       sb.append(", path=" + path);\r
-                       sb.append(", description=" + description);\r
-                       sb.append(", reference=" + reference);\r
-                       sb.append(", status=" + status);\r
-                       sb.append(", augmenting=" + augmenting);\r
-                       sb.append(", configuration=" + configuration);\r
-                       sb.append(", constraints=" + constraints);\r
-                       sb.append(", type=" + type);\r
-                       sb.append(", mustDefinition=" + mustDefinition);\r
-                       sb.append("]");\r
-                       return sb.toString();\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/ListSchemaNodeBuilder.java b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/ListSchemaNodeBuilder.java
deleted file mode 100644 (file)
index 3059ba9..0000000
+++ /dev/null
@@ -1,463 +0,0 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.model.parser.builder;\r
-\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import org.opendaylight.controller.model.parser.api.AbstractChildNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.AugmentationTargetBuilder;\r
-import org.opendaylight.controller.model.parser.api.DataSchemaNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.GroupingBuilder;\r
-import org.opendaylight.controller.model.parser.api.SchemaNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.TypeDefinitionAwareBuilder;\r
-import org.opendaylight.controller.model.parser.api.TypeDefinitionBuilder;\r
-import org.opendaylight.controller.model.parser.api.UsesNodeBuilder;\r
-import org.opendaylight.controller.yang.common.QName;\r
-import org.opendaylight.controller.yang.model.api.AugmentationSchema;\r
-import org.opendaylight.controller.yang.model.api.ConstraintDefinition;\r
-import org.opendaylight.controller.yang.model.api.DataSchemaNode;\r
-import org.opendaylight.controller.yang.model.api.ExtensionDefinition;\r
-import org.opendaylight.controller.yang.model.api.GroupingDefinition;\r
-import org.opendaylight.controller.yang.model.api.ListSchemaNode;\r
-import org.opendaylight.controller.yang.model.api.SchemaPath;\r
-import org.opendaylight.controller.yang.model.api.Status;\r
-import org.opendaylight.controller.yang.model.api.TypeDefinition;\r
-import org.opendaylight.controller.yang.model.api.UsesNode;\r
-\r
-\r
-public class ListSchemaNodeBuilder extends AbstractChildNodeBuilder implements DataSchemaNodeBuilder, SchemaNodeBuilder, AugmentationTargetBuilder, TypeDefinitionAwareBuilder {\r
-\r
-               private final ListSchemaNodeImpl instance;\r
-\r
-               private final Set<TypeDefinitionBuilder> addedTypedefs = new HashSet<TypeDefinitionBuilder>();\r
-               private final Set<AugmentationSchema> augmentations = new HashSet<AugmentationSchema>();\r
-               private final Set<UsesNodeBuilder> usesNodes = new HashSet<UsesNodeBuilder>();\r
-\r
-               ListSchemaNodeBuilder(QName qname) {\r
-                       super(qname);\r
-                       instance = new ListSchemaNodeImpl(qname);\r
-               }\r
-\r
-               @Override\r
-               public ListSchemaNode build() {\r
-                       // CHILD NODES\r
-                       Map<QName, DataSchemaNode> childs = new HashMap<QName, DataSchemaNode>();\r
-                       for(DataSchemaNodeBuilder node : childNodes) {\r
-                               childs.put(node.getQName(), node.build());\r
-                       }\r
-                       instance.setChildNodes(childs);\r
-\r
-                       // TYPEDEFS\r
-                       Set<TypeDefinition<?>> typedefs = new HashSet<TypeDefinition<?>>();\r
-                       for (TypeDefinitionBuilder entry : addedTypedefs) {\r
-                               typedefs.add(entry.build());\r
-                       }\r
-                       instance.setTypeDefinitions(typedefs);\r
-\r
-                       // USES\r
-                       Set<UsesNode> usesNodeDefinitions = new HashSet<UsesNode>();\r
-                       for(UsesNodeBuilder builder : usesNodes) {\r
-                               usesNodeDefinitions.add(builder.build());\r
-                       }\r
-                       instance.setUses(usesNodeDefinitions);\r
-\r
-                       // GROUPINGS\r
-                       Set<GroupingDefinition> groupingDefinitions = new HashSet<GroupingDefinition>();\r
-                       for (GroupingBuilder builder : groupings) {\r
-                               groupingDefinitions.add(builder.build());\r
-                       }\r
-                       instance.setGroupings(groupingDefinitions);\r
-\r
-                       instance.setAvailableAugmentations(augmentations);\r
-\r
-                       return instance;\r
-               }\r
-\r
-\r
-               @Override\r
-               public void addTypedef(TypeDefinitionBuilder type) {\r
-                       addedTypedefs.add(type);\r
-               }\r
-\r
-               @Override\r
-               public void setPath(SchemaPath path) {\r
-                       instance.setPath(path);\r
-               }\r
-\r
-               @Override\r
-               public void setDescription(String description) {\r
-                       instance.setDescription(description);\r
-               }\r
-\r
-               @Override\r
-               public void setReference(String reference) {\r
-                       instance.setReference(reference);\r
-               }\r
-\r
-               @Override\r
-               public void setStatus(Status status) {\r
-                       instance.setStatus(status);\r
-               }\r
-\r
-               @Override\r
-               public void addUsesNode(UsesNodeBuilder usesBuilder) {\r
-                       usesNodes.add(usesBuilder);\r
-               }\r
-\r
-               @Override\r
-               public void addAugmentation(AugmentationSchema augmentationSchema) {\r
-                       augmentations.add(augmentationSchema);\r
-               }\r
-\r
-               public void setKeyDefinition(List<QName> keyDefinition) {\r
-                       instance.setKeyDefinition(keyDefinition);\r
-               }\r
-               public void setAugmenting(boolean augmenting) {\r
-                       instance.setAugmenting(augmenting);\r
-               }\r
-               public void setConfiguration(boolean configuration) {\r
-                       instance.setConfiguration(configuration);\r
-               }\r
-               public void setConstraints(ConstraintDefinition constraints) {\r
-                       instance.setConstraints(constraints);\r
-               }\r
-               public void setUserOrdered(boolean userOrdered) {\r
-                       instance.setUserOrdered(userOrdered);\r
-               }\r
-\r
-\r
-               private class ListSchemaNodeImpl implements ListSchemaNode {\r
-                       private final QName qname;\r
-                       private SchemaPath path;\r
-                       private String description;\r
-                       private String reference;\r
-                       private Status status = Status.CURRENT;\r
-\r
-                       private List<QName> keyDefinition;\r
-\r
-                       private boolean augmenting;\r
-                       private boolean configuration;\r
-                       private ConstraintDefinition constraints;\r
-\r
-                       private Set<AugmentationSchema> augmentations;\r
-\r
-                       private Map<QName, DataSchemaNode> childNodes;\r
-                       private Set<TypeDefinition<?>> typeDefinitions;\r
-                       private Set<GroupingDefinition> groupings;\r
-                       private Set<UsesNode> uses;\r
-\r
-                       private boolean userOrdered;\r
-\r
-                       private ListSchemaNodeImpl(QName qname) {\r
-                               this.qname = qname;\r
-                       }\r
-\r
-\r
-                       @Override\r
-                       public QName getQName() {\r
-                               return qname;\r
-                       }\r
-\r
-                       @Override\r
-                       public SchemaPath getPath() {\r
-                               return path;\r
-                       }\r
-                       private void setPath(SchemaPath path) {\r
-                               this.path = path;\r
-                       }\r
-\r
-                       @Override\r
-                       public String getDescription() {\r
-                               return description;\r
-                       }\r
-                       private void setDescription(String description) {\r
-                               this.description = description;\r
-                       }\r
-\r
-                       @Override\r
-                       public String getReference() {\r
-                               return reference;\r
-                       }\r
-                       private void setReference(String reference) {\r
-                               this.reference = reference;\r
-                       }\r
-\r
-                       @Override\r
-                       public Status getStatus() {\r
-                               return status;\r
-                       }\r
-                       private void setStatus(Status status) {\r
-                               this.status = status;\r
-                       }\r
-\r
-                       @Override\r
-                       public List<QName> getKeyDefinition() {\r
-                               return keyDefinition;\r
-                       }\r
-                       private void setKeyDefinition(List<QName> keyDefinition) {\r
-                               this.keyDefinition = keyDefinition;\r
-                       }\r
-\r
-                       @Override\r
-                       public boolean isAugmenting() {\r
-                               return augmenting;\r
-                       }\r
-                       private void setAugmenting(boolean augmenting) {\r
-                               this.augmenting = augmenting;\r
-                       }\r
-\r
-                       @Override\r
-                       public boolean isConfiguration() {\r
-                               return configuration;\r
-                       }\r
-                       private void setConfiguration(boolean configuration) {\r
-                               this.configuration = configuration;\r
-                       }\r
-\r
-                       @Override\r
-                       public ConstraintDefinition getConstraints() {\r
-                               return constraints;\r
-                       }\r
-                       private void setConstraints(ConstraintDefinition constraints) {\r
-                               this.constraints = constraints;\r
-                       }\r
-\r
-                       @Override\r
-                       public Set<AugmentationSchema> getAvailableAugmentations() {\r
-                               return augmentations;\r
-                       }\r
-                       private void setAvailableAugmentations(Set<AugmentationSchema> augmentations) {\r
-                               this.augmentations = augmentations;\r
-                       }\r
-\r
-                       @Override\r
-                       public Set<DataSchemaNode> getChildNodes() {\r
-                               return new HashSet<DataSchemaNode>(childNodes.values());\r
-                       }\r
-                       void setChildNodes(Map<QName, DataSchemaNode> childNodes) {\r
-                               this.childNodes = childNodes;\r
-                       }\r
-\r
-                       @Override\r
-                       public Set<GroupingDefinition> getGroupings() {\r
-                               return groupings;\r
-                       }\r
-                       private void setGroupings(Set<GroupingDefinition> groupings) {\r
-                               this.groupings = groupings;\r
-                       }\r
-\r
-                       @Override\r
-                       public Set<TypeDefinition<?>> getTypeDefinitions() {\r
-                               return typeDefinitions;\r
-                       }\r
-                       private void setTypeDefinitions(Set<TypeDefinition<?>> typeDefinitions) {\r
-                               this.typeDefinitions = typeDefinitions;\r
-                       }\r
-\r
-                       @Override\r
-                       public Set<UsesNode> getUses() {\r
-                               return uses;\r
-                       }\r
-                       private void setUses(Set<UsesNode> uses) {\r
-                               this.uses = uses;\r
-                       }\r
-\r
-                       @Override\r
-                       public DataSchemaNode getDataChildByName(QName name) {\r
-                               return childNodes.get(name);\r
-                       }\r
-\r
-                       @Override\r
-                       public DataSchemaNode getDataChildByName(String name) {\r
-                               DataSchemaNode result = null;\r
-                               for(Map.Entry<QName, DataSchemaNode> entry : childNodes.entrySet()) {\r
-                                       if(entry.getKey().getLocalName().equals(name)) {\r
-                                               result = entry.getValue();\r
-                                               break;\r
-                                       }\r
-                               }\r
-                               return result;\r
-                       }\r
-\r
-                       @Override\r
-                       public boolean isUserOrdered() {\r
-                               return userOrdered;\r
-                       }\r
-                       private void setUserOrdered(boolean userOrdered) {\r
-                               this.userOrdered = userOrdered;\r
-                       }\r
-\r
-                       @Override\r
-                       public List<ExtensionDefinition> getExtensionSchemaNodes() {\r
-                               // TODO Auto-generated method stub\r
-                               return null;\r
-                       }\r
-\r
-                       @Override\r
-               public int hashCode() {\r
-                   final int prime = 31;\r
-                   int result = 1;\r
-                   result = prime * result + ((qname == null) ? 0 : qname.hashCode());\r
-                   result = prime * result + ((path == null) ? 0 : path.hashCode());\r
-                   result = prime * result + ((description == null) ? 0 : description.hashCode());\r
-                   result = prime * result + ((reference == null) ? 0 : reference.hashCode());\r
-                   result = prime * result + ((status == null) ? 0 : status.hashCode());\r
-                   result = prime * result + ((keyDefinition == null) ? 0 : keyDefinition.hashCode());\r
-                   result = prime * result + (augmenting ? 1231 : 1237);\r
-                   result = prime * result + (configuration ? 1231 : 1237);\r
-                   result = prime * result + ((constraints == null) ? 0 : constraints.hashCode());\r
-                   result = prime * result + ((augmentations == null) ? 0 : augmentations.hashCode());\r
-                   result = prime * result + ((childNodes == null) ? 0 : childNodes.hashCode());\r
-                   result = prime * result + ((typeDefinitions == null) ? 0 : typeDefinitions.hashCode());\r
-                   result = prime * result + ((groupings == null) ? 0 : groupings.hashCode());\r
-                   result = prime * result + ((uses == null) ? 0 : uses.hashCode());\r
-                   result = prime * result + (userOrdered ? 1231 : 1237);\r
-                   return result;\r
-               }\r
-\r
-\r
-                       @Override\r
-               public boolean equals(Object obj) {\r
-                   if (this == obj) {\r
-                       return true;\r
-                   }\r
-                   if (obj == null) {\r
-                       return false;\r
-                   }\r
-                   if (getClass() != obj.getClass()) {\r
-                       return false;\r
-                   }\r
-                   ListSchemaNodeImpl other = (ListSchemaNodeImpl) obj;\r
-                   if (qname == null) {\r
-                       if (other.qname != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!qname.equals(other.qname)) {\r
-                       return false;\r
-                   }\r
-                   if (path == null) {\r
-                       if (other.path != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!path.equals(other.path)) {\r
-                       return false;\r
-                   }\r
-                   if (description == null) {\r
-                       if (other.description != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!description.equals(other.description)) {\r
-                       return false;\r
-                   }\r
-                   if (reference == null) {\r
-                       if (other.reference != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!reference.equals(other.reference)) {\r
-                       return false;\r
-                   }\r
-                   if (status == null) {\r
-                       if (other.status != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!status.equals(other.status)) {\r
-                       return false;\r
-                   }\r
-                   if (keyDefinition == null) {\r
-                       if (other.keyDefinition != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!keyDefinition.equals(other.keyDefinition)) {\r
-                       return false;\r
-                   }\r
-                   if(augmenting != other.augmenting) {\r
-                       return false;\r
-                   }\r
-                   if(configuration != other.configuration) {\r
-                       return false;\r
-                   }\r
-                   if (constraints == null) {\r
-                       if (other.constraints != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!constraints.equals(other.constraints)) {\r
-                       return false;\r
-                   }\r
-                   if (augmentations == null) {\r
-                       if (other.augmentations != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!augmentations.equals(other.augmentations)) {\r
-                       return false;\r
-                   }\r
-                   if (childNodes == null) {\r
-                       if (other.childNodes != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!childNodes.equals(other.childNodes)) {\r
-                       return false;\r
-                   }\r
-                   if (typeDefinitions == null) {\r
-                       if (other.typeDefinitions != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!typeDefinitions.equals(other.typeDefinitions)) {\r
-                       return false;\r
-                   }\r
-                   if (groupings == null) {\r
-                       if (other.groupings != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!groupings.equals(other.groupings)) {\r
-                       return false;\r
-                   }\r
-                   if (uses == null) {\r
-                       if (other.uses != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!uses.equals(other.uses)) {\r
-                       return false;\r
-                   }\r
-                       if(userOrdered != other.userOrdered) {\r
-                       return false;\r
-                   }\r
-                   return true;\r
-               }\r
-\r
-\r
-\r
-\r
-                       @Override\r
-                       public String toString() {\r
-                               StringBuilder sb = new StringBuilder(ListSchemaNodeImpl.class.getSimpleName());\r
-                               sb.append("[");\r
-                               sb.append("qname="+ qname);\r
-                               sb.append(", path="+ path);\r
-                               sb.append(", description="+ description);\r
-                               sb.append(", reference="+ reference);\r
-                               sb.append(", status="+ status);\r
-                               sb.append(", keyDefinition="+ keyDefinition);\r
-                               sb.append(", augmenting="+ augmenting);\r
-                               sb.append(", configuration="+ configuration);\r
-                               sb.append(", constraints="+ constraints);\r
-                               sb.append(", augmentations="+ augmentations);\r
-                               sb.append(", childNodes="+ childNodes.values());\r
-                               sb.append(", typedefinitions="+ typeDefinitions);\r
-                               sb.append(", groupings="+ groupings);\r
-                               sb.append(", uses="+ uses);\r
-                               sb.append(", userOrdered="+ userOrdered);\r
-                               sb.append("]");\r
-                               return sb.toString();\r
-                       }\r
-               }\r
-\r
-       }
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/ModuleBuilder.java b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/main/java/org/opendaylight/controller/model/parser/builder/ModuleBuilder.java
deleted file mode 100644 (file)
index 98cfbb6..0000000
+++ /dev/null
@@ -1,824 +0,0 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.model.parser.builder;\r
-\r
-import java.net.URI;\r
-import java.util.ArrayList;\r
-import java.util.Date;\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-import java.util.Stack;\r
-\r
-import org.opendaylight.controller.model.parser.api.AugmentationSchemaBuilder;\r
-import org.opendaylight.controller.model.parser.api.Builder;\r
-import org.opendaylight.controller.model.parser.api.ChildNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.DataSchemaNodeBuilder;\r
-import org.opendaylight.controller.model.parser.api.GroupingBuilder;\r
-import org.opendaylight.controller.model.parser.api.TypeAwareBuilder;\r
-import org.opendaylight.controller.model.parser.api.TypeDefinitionAwareBuilder;\r
-import org.opendaylight.controller.model.parser.api.TypeDefinitionBuilder;\r
-import org.opendaylight.controller.model.parser.api.UsesNodeBuilder;\r
-import org.opendaylight.controller.yang.common.QName;\r
-import org.opendaylight.controller.yang.model.api.AugmentationSchema;\r
-import org.opendaylight.controller.yang.model.api.DataSchemaNode;\r
-import org.opendaylight.controller.yang.model.api.Deviation;\r
-import org.opendaylight.controller.yang.model.api.FeatureDefinition;\r
-import org.opendaylight.controller.yang.model.api.GroupingDefinition;\r
-import org.opendaylight.controller.yang.model.api.Module;\r
-import org.opendaylight.controller.yang.model.api.ModuleImport;\r
-import org.opendaylight.controller.yang.model.api.NotificationDefinition;\r
-import org.opendaylight.controller.yang.model.api.RpcDefinition;\r
-import org.opendaylight.controller.yang.model.api.TypeDefinition;\r
-import org.opendaylight.controller.yang.model.api.UsesNode;\r
-\r
-\r
-/**\r
- * This builder builds Module object. If this module is dependent on external\r
- * module/modules, these dependencies must be resolved before module is built,\r
- * otherwise result may not be valid.\r
- */\r
-public class ModuleBuilder implements Builder {\r
-\r
-       private final ModuleImpl instance;\r
-       private final String name;\r
-       private String prefix;\r
-\r
-       private final Set<ModuleImport> imports = new HashSet<ModuleImport>();\r
-       private Set<AugmentationSchema> augmentations;\r
-\r
-       /**\r
-        * All nodes, that can contain other nodes\r
-        */\r
-       private final Map<List<String>, Builder> moduleNodes = new HashMap<List<String>, Builder>();\r
-\r
-       /**\r
-        * Holds all child (DataSchemaNode) nodes: anyxml, choice, container, list, leaf, leaf-list.\r
-        */\r
-       private final Map<List<String>, DataSchemaNodeBuilder> addedChilds = new HashMap<List<String>, DataSchemaNodeBuilder>();\r
-\r
-       private final Map<List<String>, GroupingBuilder> addedGroupings = new HashMap<List<String>, GroupingBuilder>();\r
-       private final Set<AugmentationSchemaBuilder> addedAugments = new HashSet<AugmentationSchemaBuilder>();\r
-       private final Map<List<String>, UsesNodeBuilder> addedUsesNodes = new HashMap<List<String>, UsesNodeBuilder>();\r
-       private final Map<List<String>, RpcDefinitionBuilder> addedRpcs = new HashMap<List<String>, RpcDefinitionBuilder>();\r
-       private final Set<NotificationBuilder> addedNotifications = new HashSet<NotificationBuilder>();\r
-       private final Map<List<String>, FeatureBuilder> addedFeatures = new HashMap<List<String>, FeatureBuilder>();\r
-       private final Map<String, DeviationBuilder> addedDeviations = new HashMap<String, DeviationBuilder>();\r
-       private final Map<List<String>, TypeDefinitionBuilder> addedTypedefs = new HashMap<List<String>, TypeDefinitionBuilder>();\r
-\r
-\r
-       private final Map<List<String>, TypeAwareBuilder> dirtyNodes = new HashMap<List<String>, TypeAwareBuilder>();\r
-\r
-\r
-       public ModuleBuilder(String name) {\r
-               this.name = name;\r
-               instance = new ModuleImpl(name);\r
-       }\r
-\r
-       /**\r
-        * Build new Module object based on this builder. Throws IllegalStateException if builder contains unresolved nodes.\r
-        */\r
-       public Module build() {\r
-               instance.setImports(imports);\r
-\r
-               // TYPEDEFS\r
-               Set<TypeDefinition<?>> typedefs = buildModuleTypedefs(addedTypedefs);\r
-               instance.setTypeDefinitions(typedefs);\r
-\r
-               // CHILD NODES\r
-               final Map<QName, DataSchemaNode> childNodes = buildModuleChildNodes(addedChilds);\r
-               instance.setChildNodes(childNodes);\r
-\r
-               // GROUPINGS\r
-               final Set<GroupingDefinition> groupings = buildModuleGroupings(addedGroupings);\r
-               instance.setGroupings(groupings);\r
-\r
-               // USES\r
-               final Set<UsesNode> usesNodeDefinitions = buildUsesNodes(addedUsesNodes);\r
-               instance.setUses(usesNodeDefinitions);\r
-\r
-               // FEATURES\r
-               Set<FeatureDefinition> features = buildModuleFeatures(addedFeatures);\r
-               instance.setFeatures(features);\r
-\r
-               // NOTIFICATIONS\r
-               final Set<NotificationDefinition> notifications = new HashSet<NotificationDefinition>();\r
-               for (NotificationBuilder entry : addedNotifications) {\r
-                       notifications.add((NotificationDefinition) entry.build());\r
-               }\r
-               instance.setNotifications(notifications);\r
-\r
-               // AUGMENTATIONS\r
-//             final Set<AugmentationSchema> augmentations = new HashSet<AugmentationSchema>();\r
-//             for(AugmentationSchemaBuilder entry : addedAugments) {\r
-//                     augmentations.add(entry.build());\r
-//             }\r
-//             instance.setAugmentations(augmentations);\r
-               instance.setAugmentations(augmentations);\r
-\r
-               // RPCs\r
-               final Set<RpcDefinition> rpcs = buildModuleRpcs(addedRpcs);\r
-               instance.setRpcs(rpcs);\r
-\r
-               // DEVIATIONS\r
-               Set<Deviation> deviations = new HashSet<Deviation>();\r
-               for(Map.Entry<String, DeviationBuilder> entry : addedDeviations.entrySet()) {\r
-                       deviations.add(entry.getValue().build());\r
-               }\r
-               instance.setDeviations(deviations);\r
-\r
-               return instance;\r
-       }\r
-\r
-       Builder getNode(List<String> path) {\r
-               return moduleNodes.get(path);\r
-       }\r
-\r
-       Map<List<String>, TypeAwareBuilder> getDirtyNodes() {\r
-               return dirtyNodes;\r
-       }\r
-\r
-       String getName() {\r
-               return name;\r
-       }\r
-\r
-       String getPrefix() {\r
-               return prefix;\r
-       }\r
-\r
-       Set<AugmentationSchemaBuilder> getAddedAugments() {\r
-               return addedAugments;\r
-       }\r
-\r
-\r
-       public void addDirtyNode(Stack<String> path) {\r
-               List<String> dirtyNodePath = new ArrayList<String>(path);\r
-               TypeAwareBuilder nodeBuilder = (TypeAwareBuilder)moduleNodes.get(dirtyNodePath);\r
-               dirtyNodes.put(dirtyNodePath, nodeBuilder);\r
-       }\r
-\r
-       public void setNamespace(URI namespace) {\r
-               instance.setNamespace(namespace);\r
-       }\r
-\r
-       public void setRevision(Date revision) {\r
-               instance.setRevision(revision);\r
-       }\r
-\r
-       public void setPrefix(String prefix) {\r
-               this.prefix = prefix;\r
-               instance.setPrefix(prefix);\r
-       }\r
-\r
-       public void setYangVersion(String yangVersion) {\r
-               instance.setYangVersion(yangVersion);\r
-       }\r
-\r
-       public void setDescription(String description) {\r
-               instance.setDescription(description);\r
-       }\r
-       public void setReference(String reference) {\r
-               instance.setReference(reference);\r
-       }\r
-       public void setOrganization(String organization) {\r
-               instance.setOrganization(organization);\r
-       }\r
-       public void setContact(String contact) {\r
-               instance.setContact(contact);\r
-       }\r
-       public void setAugmentations(Set<AugmentationSchema> augmentations) {\r
-               this.augmentations = augmentations;\r
-       }\r
-\r
-       public boolean addModuleImport(final String moduleName, final Date revision, final String prefix) {\r
-               ModuleImport moduleImport = createModuleImport(moduleName, revision, prefix);\r
-               return imports.add(moduleImport);\r
-       }\r
-\r
-       public Set<ModuleImport> getModuleImports() {\r
-               return imports;\r
-       }\r
-\r
-       public ContainerSchemaNodeBuilder addContainerNode(QName containerName, Stack<String> parentPath) {\r
-               List<String> pathToNode = new ArrayList<String>(parentPath);\r
-\r
-               ContainerSchemaNodeBuilder containerBuilder = new ContainerSchemaNodeBuilder(containerName);\r
-\r
-               ChildNodeBuilder parent = (ChildNodeBuilder)moduleNodes.get(pathToNode);\r
-               if(parent != null) {\r
-                       parent.addChildNode(containerBuilder);\r
-               }\r
-\r
-               pathToNode.add(containerName.getLocalName());\r
-               moduleNodes.put(pathToNode, containerBuilder);\r
-               addedChilds.put(pathToNode, containerBuilder);\r
-\r
-               return containerBuilder;\r
-       }\r
-\r
-       public ListSchemaNodeBuilder addListNode(QName listName, Stack<String> parentPath) {\r
-               List<String> pathToNode = new ArrayList<String>(parentPath);\r
-\r
-               ListSchemaNodeBuilder listBuilder = new ListSchemaNodeBuilder(listName);\r
-\r
-               ChildNodeBuilder parent = (ChildNodeBuilder)moduleNodes.get(pathToNode);\r
-               if(parent != null) {\r
-                       parent.addChildNode(listBuilder);\r
-               }\r
-\r
-               pathToNode.add(listName.getLocalName());\r
-               moduleNodes.put(pathToNode, listBuilder);\r
-               addedChilds.put(pathToNode, listBuilder);\r
-\r
-               return listBuilder;\r
-       }\r
-\r
-       public LeafSchemaNodeBuilder addLeafNode(QName leafName, Stack<String> parentPath) {\r
-               List<String> pathToNode = new ArrayList<String>(parentPath);\r
-\r
-               LeafSchemaNodeBuilder leafBuilder = new LeafSchemaNodeBuilder(leafName);\r
-\r
-               ChildNodeBuilder parent = (ChildNodeBuilder)moduleNodes.get(pathToNode);\r
-               if(parent != null) {\r
-                       parent.addChildNode(leafBuilder);\r
-               }\r
-\r
-               pathToNode.add(leafName.getLocalName());\r
-               addedChilds.put(pathToNode, leafBuilder);\r
-               moduleNodes.put(pathToNode, leafBuilder);\r
-\r
-               return leafBuilder;\r
-       }\r
-\r
-       public LeafListSchemaNodeBuilder addLeafListNode(QName leafListName, Stack<String> parentPath) {\r
-               List<String> pathToNode = new ArrayList<String>(parentPath);\r
-\r
-               LeafListSchemaNodeBuilder leafListBuilder = new LeafListSchemaNodeBuilder(leafListName);\r
-               ChildNodeBuilder parent = (ChildNodeBuilder)moduleNodes.get(pathToNode);\r
-               if(parent != null) {\r
-                       parent.addChildNode(leafListBuilder);\r
-               }\r
-\r
-               pathToNode.add(leafListName.getLocalName());\r
-               addedChilds.put(pathToNode, leafListBuilder);\r
-               moduleNodes.put(pathToNode, leafListBuilder);\r
-\r
-               return leafListBuilder;\r
-       }\r
-\r
-       public GroupingBuilder addGrouping(QName qname, Stack<String> parentPath) {\r
-               List<String> pathToGroup = new ArrayList<String>(parentPath);\r
-\r
-               GroupingBuilder builder = new GroupingBuilderImpl(qname);\r
-               ChildNodeBuilder parentNodeBuilder = (ChildNodeBuilder)moduleNodes.get(pathToGroup);\r
-               if(parentNodeBuilder != null) {\r
-                       parentNodeBuilder.addGrouping(builder);\r
-               }\r
-\r
-               pathToGroup.add(qname.getLocalName());\r
-               moduleNodes.put(pathToGroup, builder);\r
-               addedGroupings.put(pathToGroup, builder);\r
-\r
-               return builder;\r
-       }\r
-\r
-       public AugmentationSchemaBuilder addAugment(String name, Stack<String> parentPath) {\r
-               List<String> pathToAugment = new ArrayList<String>(parentPath);\r
-\r
-               AugmentationSchemaBuilder builder = new AugmentationSchemaBuilderImpl(name);\r
-\r
-               // augment can only be in 'module' or 'uses' statement\r
-               UsesNodeBuilder parent = addedUsesNodes.get(pathToAugment);\r
-               if(parent != null) {\r
-                       parent.addAugment(builder);\r
-               }\r
-\r
-               pathToAugment.add(name);\r
-               moduleNodes.put(pathToAugment, builder);\r
-               addedAugments.add(builder);\r
-\r
-               return builder;\r
-       }\r
-\r
-       public UsesNodeBuilder addUsesNode(String groupingPathStr, Stack<String> parentPath) {\r
-               List<String> pathToUses = new ArrayList<String>(parentPath);\r
-\r
-               UsesNodeBuilder builder = new UsesNodeBuilderImpl(groupingPathStr);\r
-\r
-               ChildNodeBuilder parent = (ChildNodeBuilder)moduleNodes.get(pathToUses);\r
-               if(parent != null) {\r
-                       parent.addUsesNode(builder);\r
-               }\r
-\r
-               pathToUses.add(groupingPathStr);\r
-               addedUsesNodes.put(pathToUses, builder);\r
-\r
-               return builder;\r
-       }\r
-\r
-       public RpcDefinitionBuilder addRpc(QName qname, Stack<String> parentPath) {\r
-               List<String> pathToRpc = new ArrayList<String>(parentPath);\r
-\r
-               RpcDefinitionBuilder rpcBuilder = new RpcDefinitionBuilder(qname);\r
-\r
-               pathToRpc.add(qname.getLocalName());\r
-               addedRpcs.put(pathToRpc, rpcBuilder);\r
-\r
-               QName inputQName = new QName(qname.getNamespace(), qname.getRevision(), qname.getPrefix(), "input");\r
-               ContainerSchemaNodeBuilder inputBuilder = new ContainerSchemaNodeBuilder(inputQName);\r
-               List<String> pathToInput = new ArrayList<String>(pathToRpc);\r
-               pathToInput.add("input");\r
-               moduleNodes.put(pathToInput, inputBuilder);\r
-               rpcBuilder.setInput(inputBuilder);\r
-\r
-               QName outputQName = new QName(qname.getNamespace(), qname.getRevision(), qname.getPrefix(), "output");\r
-               ContainerSchemaNodeBuilder outputBuilder = new ContainerSchemaNodeBuilder(outputQName);\r
-               List<String> pathToOutput = new ArrayList<String>(pathToRpc);\r
-               pathToOutput.add("output");\r
-               moduleNodes.put(pathToOutput, outputBuilder);\r
-               rpcBuilder.setOutput(outputBuilder);\r
-\r
-               return rpcBuilder;\r
-       }\r
-\r
-       public NotificationBuilder addNotification(QName notificationName, Stack<String> parentPath) {\r
-               List<String> pathToNotification = new ArrayList<String>(parentPath);\r
-\r
-               NotificationBuilder notificationBuilder = new NotificationBuilder(notificationName);\r
-\r
-               pathToNotification.add(notificationName.getLocalName());\r
-               moduleNodes.put(pathToNotification, notificationBuilder);\r
-               addedNotifications.add(notificationBuilder);\r
-\r
-               return notificationBuilder;\r
-       }\r
-\r
-       public FeatureBuilder addFeature(QName featureName, Stack<String> parentPath) {\r
-               List<String> pathToFeature = new ArrayList<String>(parentPath);\r
-               pathToFeature.add(featureName.getLocalName());\r
-\r
-               FeatureBuilder builder = new FeatureBuilder(featureName);\r
-               addedFeatures.put(pathToFeature, builder);\r
-               return builder;\r
-       }\r
-\r
-       public TypedefBuilder addTypedef(QName typeDefName, Stack<String> parentPath) {\r
-               List<String> pathToType = new ArrayList<String>(parentPath);\r
-               TypedefBuilder builder = new TypedefBuilder(typeDefName);\r
-               TypeDefinitionAwareBuilder parent = (TypeDefinitionAwareBuilder)moduleNodes.get(pathToType);\r
-               if(parent != null) {\r
-                       parent.addTypedef(builder);\r
-               }\r
-               pathToType.add(typeDefName.getLocalName());\r
-               addedTypedefs.put(pathToType, builder);\r
-               moduleNodes.put(pathToType, builder);\r
-               return builder;\r
-       }\r
-\r
-       public Set<TypeDefinitionBuilder> getModuleTypedefs() {\r
-               Set<TypeDefinitionBuilder> typedefs = new HashSet<TypeDefinitionBuilder>();\r
-               for(Map.Entry<List<String>, TypeDefinitionBuilder> entry : addedTypedefs.entrySet()) {\r
-                       if(entry.getKey().size() == 2) {\r
-                               typedefs.add(entry.getValue());\r
-                       }\r
-               }\r
-               return typedefs;\r
-       }\r
-\r
-       public void setType(TypeDefinition<?> type, Stack<String> parentPath) {\r
-               TypeAwareBuilder parent = (TypeAwareBuilder)moduleNodes.get(parentPath);\r
-               parent.setType(type);\r
-       }\r
-\r
-       public DeviationBuilder addDeviation(String targetPath) {\r
-               DeviationBuilder builder = new DeviationBuilder(targetPath);\r
-               addedDeviations.put(targetPath, builder);\r
-               return builder;\r
-       }\r
-\r
-       public MustDefinitionBuilder addMustDefinition(String xpathStr, Stack<String> parentPath) {\r
-               MustAwareBuilder parent = (MustAwareBuilder)moduleNodes.get(parentPath);\r
-               String path = parentPath.get(parentPath.size()-1);\r
-               if(parent == null) {\r
-                       for(Map.Entry<String, DeviationBuilder> db : addedDeviations.entrySet()) {\r
-                               String key = db.getKey();\r
-                               if(key.equals(path)) {\r
-                                       parent = db.getValue();\r
-                               }\r
-                       }\r
-               }\r
-               MustDefinitionBuilder builder = new MustDefinitionBuilder(xpathStr);\r
-               parent.setMustDefinitionBuilder(builder);\r
-               return builder;\r
-       }\r
-\r
-       public ModuleBuilder addSubmodule(QName qname) {\r
-               ModuleBuilder submoduleBuilder = new ModuleBuilder(qname.getLocalName());\r
-               return submoduleBuilder;\r
-       }\r
-\r
-\r
-\r
-       private class ModuleImpl implements Module {\r
-\r
-       private URI namespace;\r
-       private final String name;\r
-       private Date revision;\r
-       private String prefix;\r
-       private String yangVersion;\r
-       private String description;\r
-       private String reference;\r
-       private String organization;\r
-       private String contact;\r
-       private Set<ModuleImport> imports;\r
-       private Set<FeatureDefinition> features;\r
-       private Set<TypeDefinition<?>> typeDefinitions;\r
-       private Set<NotificationDefinition> notifications;\r
-       private Set<AugmentationSchema> augmentations;\r
-       private Set<RpcDefinition> rpcs;\r
-       private Set<Deviation> deviations;\r
-       private Map<QName, DataSchemaNode> childNodes;\r
-       private Set<GroupingDefinition> groupings;\r
-       private Set<UsesNode> uses;\r
-\r
-       private ModuleImpl(String name) {\r
-               this.name = name;\r
-       }\r
-\r
-\r
-       @Override\r
-       public URI getNamespace() {\r
-               return namespace;\r
-       }\r
-       private void setNamespace(URI namespace) {\r
-               this.namespace = namespace;\r
-       }\r
-\r
-       @Override\r
-       public String getName() {\r
-               return name;\r
-       }\r
-\r
-       @Override\r
-       public Date getRevision() {\r
-               return revision;\r
-       }\r
-       private void setRevision(Date revision) {\r
-               this.revision = revision;\r
-       }\r
-\r
-       @Override\r
-       public String getPrefix() {\r
-               return prefix;\r
-       }\r
-       private void setPrefix(String prefix) {\r
-               this.prefix = prefix;\r
-       }\r
-\r
-       @Override\r
-       public String getYangVersion() {\r
-               return yangVersion;\r
-       }\r
-       private void setYangVersion(String yangVersion) {\r
-               this.yangVersion = yangVersion;\r
-       }\r
-\r
-       @Override\r
-       public String getDescription() {\r
-               return description;\r
-       }\r
-       private void setDescription(String description) {\r
-               this.description = description;\r
-       }\r
-\r
-       @Override\r
-       public String getReference() {\r
-               return reference;\r
-       }\r
-       private void setReference(String reference) {\r
-               this.reference = reference;\r
-       }\r
-\r
-       @Override\r
-       public String getOrganization() {\r
-               return organization;\r
-       }\r
-       private void setOrganization(String organization) {\r
-               this.organization = organization;\r
-       }\r
-\r
-       @Override\r
-       public String getContact() {\r
-               return contact;\r
-       }\r
-       private void setContact(String contact) {\r
-               this.contact = contact;\r
-       }\r
-\r
-       @Override\r
-       public Set<ModuleImport> getImports() {\r
-               return imports;\r
-       }\r
-       private void setImports(Set<ModuleImport> imports) {\r
-               this.imports = imports;\r
-       }\r
-\r
-       @Override\r
-       public Set<FeatureDefinition> getFeatures() {\r
-               return features;\r
-       }\r
-       private void setFeatures(Set<FeatureDefinition> features) {\r
-               this.features = features;\r
-       }\r
-\r
-       @Override\r
-       public Set<TypeDefinition<?>> getTypeDefinitions() {\r
-               return typeDefinitions;\r
-       }\r
-       private void setTypeDefinitions(Set<TypeDefinition<?>> typeDefinitions) {\r
-               this.typeDefinitions = typeDefinitions;\r
-       }\r
-\r
-       @Override\r
-       public Set<NotificationDefinition> getNotifications() {\r
-               return notifications;\r
-       }\r
-       private void setNotifications(Set<NotificationDefinition> notifications) {\r
-               this.notifications = notifications;\r
-       }\r
-\r
-       @Override\r
-               public Set<AugmentationSchema> getAugmentations() {\r
-                       return augmentations;\r
-               }\r
-       private void setAugmentations(Set<AugmentationSchema> augmentations) {\r
-                       this.augmentations = augmentations;\r
-               }\r
-\r
-       @Override\r
-       public Set<RpcDefinition> getRpcs() {\r
-               return rpcs;\r
-       }\r
-       private void setRpcs(Set<RpcDefinition> rpcs) {\r
-               this.rpcs = rpcs;\r
-       }\r
-\r
-       @Override\r
-       public Set<Deviation> getDeviations() {\r
-               return deviations;\r
-       }\r
-       private void setDeviations(Set<Deviation> deviations) {\r
-               this.deviations = deviations;\r
-       }\r
-\r
-       @Override\r
-       public Set<DataSchemaNode> getChildNodes() {\r
-               return new HashSet<DataSchemaNode>(childNodes.values());\r
-       }\r
-       private void setChildNodes(Map<QName, DataSchemaNode> childNodes) {\r
-               this.childNodes = childNodes;\r
-       }\r
-\r
-       @Override\r
-       public Set<GroupingDefinition> getGroupings() {\r
-               return groupings;\r
-       }\r
-       private void setGroupings(Set<GroupingDefinition> groupings) {\r
-               this.groupings = groupings;\r
-       }\r
-\r
-       @Override\r
-       public Set<UsesNode> getUses() {\r
-                       return uses;\r
-               }\r
-               private void setUses(Set<UsesNode> uses) {\r
-                       this.uses = uses;\r
-               }\r
-\r
-       @Override\r
-               public DataSchemaNode getDataChildByName(QName name) {\r
-                       return childNodes.get(name);\r
-               }\r
-               @Override\r
-               public DataSchemaNode getDataChildByName(String name) {\r
-                       DataSchemaNode result = null;\r
-                       for(Map.Entry<QName, DataSchemaNode> entry : childNodes.entrySet()) {\r
-                               if(entry.getKey().getLocalName().equals(name)) {\r
-                                       result = entry.getValue();\r
-                                       break;\r
-                               }\r
-                       }\r
-                       return result;\r
-               }\r
-\r
-               @Override\r
-               public String toString() {\r
-                       StringBuilder sb = new StringBuilder(ModuleImpl.class.getSimpleName());\r
-                       sb.append("[\n");\r
-                       sb.append("name="+ name +",\n");\r
-                       sb.append("namespace="+ namespace +",\n");\r
-                       sb.append("revision="+ revision +",\n");\r
-                       sb.append("prefix="+ prefix +",\n");\r
-                       sb.append("yangVersion="+ yangVersion +",\n");\r
-                       sb.append("description="+ description +",\n");\r
-                       sb.append("reference="+ reference +",\n");\r
-                       sb.append("organization="+ organization +",\n");\r
-                       sb.append("contact="+ contact +",\n");\r
-                       sb.append("childNodes="+ childNodes.values() +",\n");\r
-                       sb.append("groupings="+ groupings +",\n");\r
-                       sb.append("imports="+ imports +",\n");\r
-                       sb.append("features="+ features +",\n");\r
-                       sb.append("typeDefinitions="+ typeDefinitions +",\n");\r
-                       sb.append("notifications="+ notifications +",\n");\r
-                       sb.append("augmentations="+ augmentations +",\n");\r
-                       sb.append("rpcs="+ rpcs +",\n");\r
-                       sb.append("deviations="+ deviations +"\n");\r
-                       sb.append("]");\r
-                       return sb.toString();\r
-               }\r
-\r
-    }\r
-\r
-       private ModuleImport createModuleImport(final String moduleName, final Date revision, final String prefix) {\r
-               ModuleImport moduleImport = new ModuleImport() {\r
-                       @Override\r
-                       public String getModuleName() {\r
-                               return moduleName;\r
-                       }\r
-                       @Override\r
-                       public Date getRevision() {\r
-                               return revision;\r
-                       }\r
-                       @Override\r
-                       public String getPrefix() {\r
-                               return prefix;\r
-                       }\r
-\r
-                       @Override\r
-                       public int hashCode() {\r
-                               final int prime = 31;\r
-                   int result = 1;\r
-                   result = prime * result + ((moduleName == null) ? 0 : moduleName.hashCode());\r
-                   result = prime * result + ((revision == null) ? 0 : revision.hashCode());\r
-                   result = prime * result + ((prefix == null) ? 0 : prefix.hashCode());\r
-                   return result;\r
-                       }\r
-\r
-                       @Override\r
-               public boolean equals(Object obj) {\r
-                   if (this == obj) {\r
-                       return true;\r
-                   }\r
-                   if (obj == null) {\r
-                       return false;\r
-                   }\r
-                   if (getClass() != obj.getClass()) {\r
-                       return false;\r
-                   }\r
-                   ModuleImport other = (ModuleImport) obj;\r
-                   if (getModuleName() == null) {\r
-                       if (other.getModuleName() != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!getModuleName().equals(other.getModuleName())) {\r
-                       return false;\r
-                   }\r
-                   if (getRevision() == null) {\r
-                       if (other.getRevision() != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!getRevision().equals(other.getRevision())) {\r
-                       return false;\r
-                   }\r
-                   if (getPrefix() == null) {\r
-                       if (other.getPrefix() != null) {\r
-                           return false;\r
-                       }\r
-                   } else if (!getPrefix().equals(other.getPrefix())) {\r
-                       return false;\r
-                   }\r
-                   return true;\r
-               }\r
-\r
-                       @Override\r
-                       public String toString() {\r
-                               return "ModuleImport[moduleName="+ moduleName +", revision="+ revision +", prefix="+ prefix +"]";\r
-      &nb