Merge "Test for class RefineHolder.java"
authorMartin Vitez <mvitez@cisco.com>
Tue, 17 Sep 2013 09:37:55 +0000 (09:37 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 17 Sep 2013 09:37:55 +0000 (09:37 +0000)
83 files changed:
code-generator/binding-generator-api/pom.xml
code-generator/binding-generator-impl/pom.xml
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/BindingGeneratorImpl.xtend
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/yang/types/TypeProviderImpl.java
code-generator/binding-generator-spi/pom.xml
code-generator/binding-generator-util/pom.xml
code-generator/binding-java-api-generator/pom.xml
code-generator/binding-model-api/pom.xml
code-generator/maven-sal-api-gen-plugin/pom.xml
code-generator/pom.xml
model/iana/iana-afn-safi/pom.xml
model/iana/iana-if-type/pom.xml
model/iana/pom.xml
model/ietf/ietf-inet-types/pom.xml
model/ietf/ietf-ted/pom.xml
model/ietf/ietf-topology/pom.xml
model/ietf/ietf-yang-types/pom.xml
model/ietf/pom.xml
model/l2-types/pom.xml
model/pom.xml
pom.xml
yang/pom.xml
yang/yang-binding/pom.xml
yang/yang-common/pom.xml
yang/yang-data-api/pom.xml
yang/yang-data-impl/pom.xml
yang/yang-data-util/pom.xml
yang/yang-ext/pom.xml
yang/yang-maven-plugin-it/pom.xml
yang/yang-maven-plugin-it/src/test/resources/AdditionalConfig/pom.xml
yang/yang-maven-plugin-it/src/test/resources/Correct/pom.xml
yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/pom.xml
yang/yang-maven-plugin-it/src/test/resources/GenerateTest2/pom.xml
yang/yang-maven-plugin-it/src/test/resources/Generator/pom.xml
yang/yang-maven-plugin-it/src/test/resources/MissingYangInDep/pom.xml
yang/yang-maven-plugin-it/src/test/resources/NoGenerators/pom.xml
yang/yang-maven-plugin-it/src/test/resources/NoOutputDir/pom.xml
yang/yang-maven-plugin-it/src/test/resources/NoYangFiles/pom.xml
yang/yang-maven-plugin-it/src/test/resources/UnknownGenerator/pom.xml
yang/yang-maven-plugin-it/src/test/resources/YangRootNotExist/pom.xml
yang/yang-maven-plugin-spi/pom.xml
yang/yang-maven-plugin/pom.xml
yang/yang-model-api/pom.xml
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/package-info.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/type/DecimalTypeDefinition.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/type/EmptyTypeDefinition.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/type/IntegerTypeDefinition.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/type/StringTypeDefinition.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/type/UnknownTypeDefinition.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/type/UnsignedIntegerTypeDefinition.java
yang/yang-model-util/pom.xml
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/AbstractSignedInteger.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/AbstractUnsignedInteger.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/BinaryType.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/BitsType.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/BooleanType.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/Decimal64.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/EmptyType.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/EnumerationType.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/ExtendedType.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/IdentityrefType.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/InstanceIdentifier.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/Int16.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/Int32.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/Int64.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/Int8.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/Leafref.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/StringType.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/Uint16.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/Uint32.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/Uint64.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/Uint8.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/UnionType.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/UnknownType.java
yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/Int8Test.java
yang/yang-parser-api/pom.xml
yang/yang-parser-impl/pom.xml
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/CopyUtils.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/ParserListenerUtils.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/TypeUtils.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/impl/TypesResolutionTest.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/impl/YangParserTest.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/impl/YangParserWithContextTest.java

index 9eaba8792e10016cc258ec098b04ca2e76d4e763..1f5ef17b429f0312959c4f316d6ed5aea2eb0e9f 100644 (file)
@@ -4,7 +4,7 @@
     <parent>\r
         <groupId>org.opendaylight.yangtools</groupId>\r
         <artifactId>binding-generator</artifactId>\r
-        <version>0.5.7-SNAPSHOT</version>\r
+        <version>0.5.8-SNAPSHOT</version>\r
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
index 60f6ff573411c764a10d55c7c48dad9bfdb6f626..aa75bd2e284ee883209190a6784308d5f8a8d3c2 100644 (file)
@@ -4,7 +4,7 @@
     <parent>\r
         <groupId>org.opendaylight.yangtools</groupId>\r
         <artifactId>binding-generator</artifactId>\r
-        <version>0.5.7-SNAPSHOT</version>\r
+        <version>0.5.8-SNAPSHOT</version>\r
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
index 364785dede5fbf0a198a59dce14754f6517d912d..8bc95f38a5ef49a40d65580855dee7f90ea0d46c 100644 (file)
@@ -1358,7 +1358,7 @@ public class BindingGeneratorImpl implements BindingGenerator {
                                var Type returnType = null;
                                if (typeDef instanceof EnumTypeDefinition) {
                                        returnType = typeProvider.javaTypeForSchemaDefinitionType(typeDef, leaf);
-                                       val enumTypeDef = enumTypeDefFromExtendedType(typeDef);
+                                       val enumTypeDef = typeDef as EnumTypeDefinition;
                                        val enumBuilder = resolveInnerEnumFromTypeDefinition(enumTypeDef, leafName, typeBuilder);
 
                                        if (enumBuilder !== null) {
@@ -1875,7 +1875,7 @@ public class BindingGeneratorImpl implements BindingGenerator {
                if (typeDef instanceof UnionTypeDefinition) {
                        genTOBuilders.addAll(
                                (typeProvider as TypeProviderImpl).
-                                       provideGeneratedTOBuildersForUnionTypeDef(packageName, typeDef, classNameFromLeaf, leaf));
+                                       provideGeneratedTOBuildersForUnionTypeDef(packageName, (typeDef as UnionTypeDefinition), classNameFromLeaf, leaf));
                } else if (typeDef instanceof BitsTypeDefinition) {
                        genTOBuilders.add(
                                ((typeProvider as TypeProviderImpl) ).
index 9bb36e07af7b9db928bc6a87e1636a34c525fe6c..d39fcff75c53164c2bcc083e3b81690a959bd402 100644 (file)
@@ -7,13 +7,8 @@
  */
 package org.opendaylight.yangtools.sal.binding.yang.types;
 
-import static org.opendaylight.yangtools.binding.generator.util.BindingGeneratorUtil.moduleNamespaceToPackageName;
-import static org.opendaylight.yangtools.binding.generator.util.BindingGeneratorUtil.packageNameForGeneratedType;
-import static org.opendaylight.yangtools.binding.generator.util.BindingGeneratorUtil.parseToClassName;
-import static org.opendaylight.yangtools.binding.generator.util.BindingGeneratorUtil.parseToValidParamName;
-import static org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findDataSchemaNode;
-import static org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findDataSchemaNodeForRelativeXPath;
-import static org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findParentModule;
+import static org.opendaylight.yangtools.binding.generator.util.BindingGeneratorUtil.*;
+import static org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.*;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -82,7 +77,7 @@ public final class TypeProviderImpl implements TypeProvider {
 
     /**
      * Creates new instance of class <code>TypeProviderImpl</code>.
-     * 
+     *
      * @param schemaContext
      *            contains the schema data red from YANG files
      * @throws IllegalArgumentException
@@ -99,7 +94,7 @@ public final class TypeProviderImpl implements TypeProvider {
 
     /**
      * Puts <code>refType</code> to map with key <code>refTypePath</code>
-     * 
+     *
      * @param refTypePath
      *            schema path used as the map key
      * @param refType
@@ -109,20 +104,19 @@ public final class TypeProviderImpl implements TypeProvider {
      *             <li>if <code>refTypePath</code> equal null</li>
      *             <li>if <code>refType</code> equal null</li>
      *             </ul>
-     * 
+     *
      */
     public void putReferencedType(final SchemaPath refTypePath, final Type refType) {
         Preconditions.checkArgument(refTypePath != null,
                 "Path reference of Enumeration Type Definition cannot be NULL!");
-
         Preconditions.checkArgument(refType != null, "Reference to Enumeration Type cannot be NULL!");
         referencedTypes.put(refTypePath, refType);
     }
 
     /**
-     * 
+     *
      * Converts basic YANG type <code>type</code> to JAVA <code>Type</code>.
-     * 
+     *
      * @param type
      *            string with YANG name of type
      * @returns JAVA <code>Type</code> for YANG type <code>type</code>
@@ -137,7 +131,7 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Converts schema definition type <code>typeDefinition</code> to JAVA
      * <code>Type</code>
-     * 
+     *
      * @param typeDefinition
      *            type definition which is converted to JAVA type
      * @throws IllegalArgumentException
@@ -180,7 +174,7 @@ public final class TypeProviderImpl implements TypeProvider {
      * Returns JAVA <code>Type</code> for instances of the type
      * <code>LeafrefTypeDefinition</code> or
      * <code>IdentityrefTypeDefinition</code>.
-     * 
+     *
      * @param typeDefinition
      *            type definition which is converted to JAVA <code>Type</code>
      * @return JAVA <code>Type</code> instance for <code>typeDefinition</code>
@@ -200,7 +194,7 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Returns JAVA <code>Type</code> for instances of the type
      * <code>ExtendedType</code>.
-     * 
+     *
      * @param typeDefinition
      *            type definition which is converted to JAVA <code>Type</code>
      * @return JAVA <code>Type</code> instance for <code>typeDefinition</code>
@@ -241,11 +235,11 @@ public final class TypeProviderImpl implements TypeProvider {
      * Seeks for identity reference <code>idref</code> the JAVA
      * <code>type</code>.<br />
      * <br />
-     * 
+     *
      * <i>Example:<br />
      * If identy which is referenced via <code>idref</code> has name <b>Idn</b>
      * then returning type is <b>{@code Class<? extends Idn>}</b></i>
-     * 
+     *
      * @param idref
      *            identityref type definition for which JAVA <code>Type</code>
      *            is sought
@@ -275,7 +269,7 @@ public final class TypeProviderImpl implements TypeProvider {
 
     /**
      * Converts <code>typeDefinition</code> to concrete JAVA <code>Type</code>.
-     * 
+     *
      * @param typeDefinition
      *            type definition which should be converted to JAVA
      *            <code>Type</code>
@@ -320,7 +314,7 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Gets base type definition for <code>extendTypeDef</code>. The method is
      * recursivelly called until non <code>ExtendedType</code> type is found.
-     * 
+     *
      * @param extendTypeDef
      *            type definition for which is the base type definition sought
      * @return type definition which is base type for <code>extendTypeDef</code>
@@ -340,10 +334,10 @@ public final class TypeProviderImpl implements TypeProvider {
 
     /**
      * Converts <code>leafrefType</code> to JAVA <code>Type</code>.
-     * 
+     *
      * The path of <code>leafrefType</code> is followed to find referenced node
      * and its <code>Type</code> is returned.
-     * 
+     *
      * @param leafrefType
      *            leafref type definition for which is the type sought
      * @return JAVA <code>Type</code> of data schema node which is referenced in
@@ -353,7 +347,7 @@ public final class TypeProviderImpl implements TypeProvider {
      *             <li>if <code>leafrefType</code> equal null</li>
      *             <li>if path statement of <code>leafrefType</code> equal null</li>
      *             </ul>
-     * 
+     *
      */
     public Type provideTypeForLeafref(final LeafrefTypeDefinition leafrefType, final SchemaNode parentNode) {
         Type returnType = null;
@@ -394,7 +388,7 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Checks if <code>dataNode</code> is <code>LeafSchemaNode</code> and if it
      * so then checks if it is of type <code>EnumTypeDefinition</code>.
-     * 
+     *
      * @param dataNode
      *            data schema node for which is checked if it is leaf and if it
      *            is of enum type
@@ -417,7 +411,7 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Checks if <code>dataNode</code> is <code>LeafListSchemaNode</code> and if
      * it so then checks if it is of type <code>EnumTypeDefinition</code>.
-     * 
+     *
      * @param dataNode
      *            data schema node for which is checked if it is leaflist and if
      *            it is of enum type
@@ -442,7 +436,7 @@ public final class TypeProviderImpl implements TypeProvider {
      * Converts <code>enumTypeDef</code> to
      * {@link org.opendaylight.yangtools.sal.binding.model.api.Enumeration
      * enumeration}.
-     * 
+     *
      * @param enumTypeDef
      *            enumeration type definition which is converted to enumeration
      * @param enumName
@@ -479,7 +473,7 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Adds enumeration to <code>typeBuilder</code>. The enumeration data are
      * taken from <code>enumTypeDef</code>.
-     * 
+     *
      * @param enumTypeDef
      *            enumeration type definition is source of enumeration data for
      *            <code>typeBuilder</code>
@@ -497,7 +491,7 @@ public final class TypeProviderImpl implements TypeProvider {
      *             <li>if name of <code>enumTypeDef</code> equal null</li>
      *             <li>if name of <code>typeBuilder</code> equal null</li>
      *             </ul>
-     * 
+     *
      */
     private Enumeration addInnerEnumerationToTypeBuilder(final EnumTypeDefinition enumTypeDef, final String enumName,
             final GeneratedTypeBuilderBase<?> typeBuilder) {
@@ -518,7 +512,7 @@ public final class TypeProviderImpl implements TypeProvider {
 
     /**
      * Converts <code>dataNode</code> to JAVA <code>Type</code>.
-     * 
+     *
      * @param dataNode
      *            contains information about YANG type
      * @return JAVA <code>Type</code> representation of <code>dataNode</code>
@@ -540,7 +534,7 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Passes through all modules and through all its type definitions and
      * convert it to generated types.
-     * 
+     *
      * The modules are firstly sorted by mutual dependencies. The modules are
      * sequentially passed. All type definitions of a module are at the
      * beginning sorted so that type definition with less amount of references
@@ -549,7 +543,7 @@ public final class TypeProviderImpl implements TypeProvider {
      * {@link TypeProviderImpl#genTypeDefsContextMap genTypeDefsContextMap}
      * which map current module name to the map which maps type names to
      * returned types (generated types).
-     * 
+     *
      */
     private void resolveTypeDefsFromContext() {
         final Set<Module> modules = schemaContext.getModules();
@@ -583,7 +577,7 @@ public final class TypeProviderImpl implements TypeProvider {
     }
 
     /**
-     * 
+     *
      * @param basePackageName
      *            string with name of package to which the module belongs
      * @param moduleName
@@ -611,7 +605,7 @@ public final class TypeProviderImpl implements TypeProvider {
                     returnType = provideGeneratedTOFromExtendedType(innerExtendedType, basePackageName, typedefName);
                 } else if (innerTypeDefinition instanceof UnionTypeDefinition) {
                     final GeneratedTOBuilder genTOBuilder = provideGeneratedTOBuilderForUnionTypeDef(basePackageName,
-                            typedef, typedefName, typedef);
+                            (UnionTypeDefinition) innerTypeDefinition, typedefName, typedef);
                     returnType = genTOBuilder.toInstance();
                 } else if (innerTypeDefinition instanceof EnumTypeDefinition) {
                     final EnumTypeDefinition enumTypeDef = (EnumTypeDefinition) innerTypeDefinition;
@@ -643,7 +637,7 @@ public final class TypeProviderImpl implements TypeProvider {
 
     /**
      * Wraps base YANG type to generated TO.
-     * 
+     *
      * @param basePackageName
      *            string with name of package to which the module belongs
      * @param typedef
@@ -675,7 +669,7 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Converts output list of generated TO builders to one TO builder (first
      * from list) which contains the remaining builders as its enclosing TO.
-     * 
+     *
      * @param basePackageName
      *            string with name of package to which the module belongs
      * @param typedef
@@ -687,7 +681,7 @@ public final class TypeProviderImpl implements TypeProvider {
      *         builders
      */
     public GeneratedTOBuilder provideGeneratedTOBuilderForUnionTypeDef(final String basePackageName,
-            final TypeDefinition<?> typedef, String typeDefName, SchemaNode parentNode) {
+            final UnionTypeDefinition typedef, String typeDefName, SchemaNode parentNode) {
         final List<GeneratedTOBuilder> genTOBuilders = provideGeneratedTOBuildersForUnionTypeDef(basePackageName,
                 typedef, typeDefName, parentNode);
         GeneratedTOBuilder resultTOBuilder = null;
@@ -705,7 +699,7 @@ public final class TypeProviderImpl implements TypeProvider {
      * Converts <code>typedef</code> to generated TO with
      * <code>typeDefName</code>. Every union type from <code>typedef</code> is
      * added to generated TO builder as property.
-     * 
+     *
      * @param basePackageName
      *            string with name of package to which the module belongs
      * @param typedef
@@ -722,7 +716,7 @@ public final class TypeProviderImpl implements TypeProvider {
      *             </ul>
      */
     public List<GeneratedTOBuilder> provideGeneratedTOBuildersForUnionTypeDef(final String basePackageName,
-            final TypeDefinition<?> typedef, final String typeDefName, final SchemaNode parentNode) {
+            final UnionTypeDefinition typedef, final String typeDefName, final SchemaNode parentNode) {
         Preconditions.checkArgument(basePackageName != null, "Base Package Name cannot be NULL!");
         Preconditions.checkArgument(typedef != null, "Type Definition cannot be NULL!");
         Preconditions.checkArgument(typedef.getQName() != null,
@@ -730,10 +724,8 @@ public final class TypeProviderImpl implements TypeProvider {
 
         final List<GeneratedTOBuilder> generatedTOBuilders = new ArrayList<>();
 
-        final TypeDefinition<?> baseTypeDefinition = typedef.getBaseType();
-        if ((baseTypeDefinition != null) && (baseTypeDefinition instanceof UnionTypeDefinition)) {
-            final UnionTypeDefinition unionTypeDef = (UnionTypeDefinition) baseTypeDefinition;
-            final List<TypeDefinition<?>> unionTypes = unionTypeDef.getTypes();
+        if (typedef != null) {
+            final List<TypeDefinition<?>> unionTypes = typedef.getTypes();
 
             final GeneratedTOBuilder unionGenTOBuilder;
             if (typeDefName != null && !typeDefName.isEmpty()) {
@@ -748,7 +740,7 @@ public final class TypeProviderImpl implements TypeProvider {
             for (final TypeDefinition<?> unionType : unionTypes) {
                 final String unionTypeName = unionType.getQName().getLocalName();
                 if (unionType instanceof UnionType) {
-                    generatedTOBuilders.addAll(resolveUnionSubtypeAsUnion(unionGenTOBuilder, unionType,
+                    generatedTOBuilders.addAll(resolveUnionSubtypeAsUnion(unionGenTOBuilder, (UnionType) unionType,
                             basePackageName, parentNode));
                 } else if (unionType instanceof ExtendedType) {
                     resolveExtendedSubtypeAsUnion(unionGenTOBuilder, (ExtendedType) unionType, unionTypeName,
@@ -775,14 +767,14 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Wraps code which handle case when union subtype is also of the type
      * <code>UnionType</code>.
-     * 
+     *
      * In this case the new generated TO is created for union subtype (recursive
      * call of method
      * {@link #provideGeneratedTOBuilderForUnionTypeDef(String, TypeDefinition, String)
      * provideGeneratedTOBuilderForUnionTypeDef} and in parent TO builder
      * <code>parentUnionGenTOBuilder</code> is created property which type is
      * equal to new generated TO.
-     * 
+     *
      * @param parentUnionGenTOBuilder
      *            generated TO builder to which is the property with the child
      *            union subtype added
@@ -795,7 +787,7 @@ public final class TypeProviderImpl implements TypeProvider {
      *         <code>provideGeneratedTOBuildersForUnionTypeDef</code> method.
      */
     private List<GeneratedTOBuilder> resolveUnionSubtypeAsUnion(final GeneratedTOBuilder parentUnionGenTOBuilder,
-            final TypeDefinition<?> unionSubtype, final String basePackageName, final SchemaNode parentNode) {
+            final UnionTypeDefinition unionSubtype, final String basePackageName, final SchemaNode parentNode) {
         final String newTOBuilderName = provideAvailableNameForGenTOBuilder(parentUnionGenTOBuilder.getName());
         final List<GeneratedTOBuilder> subUnionGenTOBUilders = provideGeneratedTOBuildersForUnionTypeDef(
                 basePackageName, unionSubtype, newTOBuilderName, parentNode);
@@ -813,11 +805,11 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Wraps code which handle case when union subtype is of the type
      * <code>ExtendedType</code>.
-     * 
+     *
      * If TO for this type already exists it is used for the creation of the
      * property in <code>parentUnionGenTOBuilder</code>. In other case the base
      * type is used for the property creation.
-     * 
+     *
      * @param parentUnionGenTOBuilder
      *            generated TO builder in which new property is created
      * @param unionSubtype
@@ -852,7 +844,7 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Searches for generated TO for <code>searchedTypeDef</code> type
      * definition in {@link #genTypeDefsContextMap genTypeDefsContextMap}
-     * 
+     *
      * @param searchedTypeName
      *            string with name of <code>searchedTypeDef</code>
      * @return generated TO for <code>searchedTypeDef</code> or
@@ -873,7 +865,7 @@ public final class TypeProviderImpl implements TypeProvider {
      * Stores generated TO created from <code>genTOBuilder</code> for
      * <code>newTypeDef</code> to {@link #genTypeDefsContextMap
      * genTypeDefsContextMap} if the module for <code>newTypeDef</code> exists
-     * 
+     *
      * @param newTypeDef
      *            type definition for which is <code>genTOBuilder</code> created
      * @param genTOBuilder
@@ -894,7 +886,7 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Adds a new property with the name <code>propertyName</code> and with type
      * <code>type</code> to <code>unonGenTransObject</code>.
-     * 
+     *
      * @param unionGenTransObject
      *            generated TO to which should be property added
      * @param type
@@ -919,7 +911,7 @@ public final class TypeProviderImpl implements TypeProvider {
 
     /**
      * Converts <code>typedef</code> to the generated TO builder.
-     * 
+     *
      * @param basePackageName
      *            string with name of package to which the module belongs
      * @param typedef
@@ -944,10 +936,10 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Converts <code>typeDef</code> which should be of the type
      * <code>BitsTypeDefinition</code> to <code>GeneratedTOBuilder</code>.
-     * 
+     *
      * All the bits of the typeDef are added to returning generated TO as
      * properties.
-     * 
+     *
      * @param basePackageName
      *            string with name of package to which the module belongs
      * @param typeDef
@@ -994,20 +986,20 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Converts the pattern constraints from <code>typedef</code> to the list of
      * the strings which represents these constraints.
-     * 
+     *
      * @param typedef
      *            extended type in which are the pattern constraints sought
      * @return list of strings which represents the constraint patterns
      * @throws IllegalArgumentException
      *             if <code>typedef</code> equals null
-     * 
+     *
      */
     private List<String> resolveRegExpressionsFromTypedef(ExtendedType typedef) {
         final List<String> regExps = new ArrayList<String>();
         Preconditions.checkArgument(typedef != null, "typedef can't be null");
         final TypeDefinition<?> strTypeDef = baseTypeDefForExtendedType(typedef);
         if (strTypeDef instanceof StringType) {
-            final List<PatternConstraint> patternConstraints = typedef.getPatterns();
+            final List<PatternConstraint> patternConstraints = typedef.getPatternConstraints();
             if (!patternConstraints.isEmpty()) {
                 String regEx;
                 String modifiedRegEx;
@@ -1022,10 +1014,10 @@ public final class TypeProviderImpl implements TypeProvider {
     }
 
     /**
-     * 
+     *
      * Adds to the <code>genTOBuilder</code> the constant which contains regular
      * expressions from the <code>regularExpressions</code>
-     * 
+     *
      * @param genTOBuilder
      *            generated TO builder to which are
      *            <code>regular expressions</code> added
@@ -1055,11 +1047,11 @@ public final class TypeProviderImpl implements TypeProvider {
      * <code>innerExtendedType</code>, about the package name
      * <code>typedefName</code> and about the generated TO name
      * <code>typedefName</code>.
-     * 
+     *
      * It is supposed that <code>innerExtendedType</code> is already present in
      * {@link TypeProviderImpl#genTypeDefsContextMap genTypeDefsContextMap} to
      * be possible set it as extended type for the returning generated TO.
-     * 
+     *
      * @param innerExtendedType
      *            extended type which is part of some other extended type
      * @param basePackageName
@@ -1109,7 +1101,7 @@ public final class TypeProviderImpl implements TypeProvider {
      * equal depth. In next step are lists from this map concatenated to one
      * list in ascending order according to their depth. All type definitions
      * are in the list behind all type definitions on which depends.
-     * 
+     *
      * @param unsortedTypeDefinitions
      *            list of type definitions which should be sorted by depth
      * @return list of type definitions sorted according their each other
@@ -1142,14 +1134,16 @@ public final class TypeProviderImpl implements TypeProvider {
     /**
      * Returns how many immersion is necessary to get from the type definition
      * to the base type.
-     * 
+     *
      * @param typeDefinition
      *            type definition for which is depth sought.
      * @return number of immersions which are necessary to get from the type
      *         definition to the base type
      */
     private int getTypeDefinitionDepth(final TypeDefinition<?> typeDefinition) {
-        Preconditions.checkArgument(typeDefinition != null, "Type definition can't be null");
+        if (typeDefinition == null) {
+            return 1;
+        }
         int depth = 1;
         TypeDefinition<?> baseType = typeDefinition.getBaseType();
 
@@ -1174,7 +1168,7 @@ public final class TypeProviderImpl implements TypeProvider {
      * Returns string which contains the same value as <code>name</code> but
      * integer suffix is incremented by one. If <code>name</code> contains no
      * number suffix then number 1 is added.
-     * 
+     *
      * @param name
      *            string with name of augmented node
      * @return string with the number suffix incremented by one (or 1 is added)
index 84bc8f855676a841071c71691c49e6560aec153e..14677b467d2c30ef65d96ba30361434f412a5d35 100644 (file)
@@ -4,7 +4,7 @@
     <parent>\r
         <groupId>org.opendaylight.yangtools</groupId>\r
         <artifactId>binding-generator</artifactId>\r
-        <version>0.5.7-SNAPSHOT</version>\r
+        <version>0.5.8-SNAPSHOT</version>\r
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
index d28873ec8e1e14236f4024ff3ff30510fc79637a..d8b3e20f7848df18e367e4acc614a5fecc59d6bd 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>binding-generator</artifactId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index eb56ff18267cb4285a9a15b405cf3188b33f1262..76b9223dbdb6a12adbb79238ede99e2679e2f3b8 100644 (file)
@@ -4,7 +4,7 @@
     <parent>\r
         <groupId>org.opendaylight.yangtools</groupId>\r
         <artifactId>binding-generator</artifactId>\r
-        <version>0.5.7-SNAPSHOT</version>\r
+        <version>0.5.8-SNAPSHOT</version>\r
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
index 5c8dc5ba4ebc3c8fb0d0e2dc29a67594630e7e28..01786ddc540872856ed349cb5030169ca851cad9 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>binding-generator</artifactId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
@@ -16,7 +16,6 @@
        <dependency>
                <groupId>org.opendaylight.yangtools</groupId>           
                <artifactId>yang-model-api</artifactId>
-               <version>0.5.7-SNAPSHOT</version>               
        </dependency>
     </dependencies>
 </project>
index 88cd1ce491b73f51db0117ccc1ed9934a9535418..24e1a6f313ed519f0347a7ee5a241d46e913fd1a 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>binding-generator</artifactId>
         <groupId>org.opendaylight.yangtools</groupId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index fda59c067588888dfd61e65a1274752926c231d0..93663bdae595b281061d7dc8ab87d6cdb8467a51 100644 (file)
@@ -8,14 +8,14 @@
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
-    <version>0.5.7-SNAPSHOT</version>
+    <version>0.5.8-SNAPSHOT</version>
     <artifactId>binding-generator</artifactId>
     <packaging>pom</packaging>
     <name>${project.artifactId}</name>
     <description>${project.artifactId}</description>
     
     <properties>
-       <yang.version>0.5.7-SNAPSHOT</yang.version>
+       <yang.version>0.5.8-SNAPSHOT</yang.version>
     </properties>
 
     <modules>
index 7aea52505ac5d6a303cd2f0f3085c152d0e98ba2..d99ce33e918be878c223233b6881bb08e91e4020 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>model-iana</artifactId>
         <groupId>org.opendaylight.yangtools.model</groupId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index e64b7cd92d57e55de5537226f434d21272102b5a..38c11afdb5ebafd4eb18343a865966b1ed1772a4 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>model-iana</artifactId>
         <groupId>org.opendaylight.yangtools.model</groupId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index 0b5cc3ee95bd62e004bda80e53f72f56b3e90fe7..3d62dc5d5385444ae25867ae15b1301bab8183b5 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>model-parent</artifactId>
         <groupId>org.opendaylight.yangtools.model</groupId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index 72281e0fa205b81af4e22aef5c2a69d91ec72e56..0305d76ff1dae4d504e6469c210bc60f8fdd364f 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>model-ietf</artifactId>
         <groupId>org.opendaylight.yangtools.model</groupId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index f848125272ed419481d30ffac26a0f6cd231a8ea..aab3808b01a9d4e9198fb6b7abe40288d2102f09 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>model-ietf</artifactId>
         <groupId>org.opendaylight.yangtools.model</groupId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index 64678ca0c7af1309a47f8e7b076145bcc5fe738e..8de7d741b93070e95f4dfa9ed0902fb64f6d7097 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>model-ietf</artifactId>
         <groupId>org.opendaylight.yangtools.model</groupId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index 10a1ef8d2314bd9f8dcd3fae7dbbd76dff68a1e9..f163743895721cfa8347db34abe9840b5d99febb 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>model-ietf</artifactId>
         <groupId>org.opendaylight.yangtools.model</groupId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index ae8f0627d9be25cdee5c88605f787f6082de6764..b05fdb1afae57f4b51ba00c7e85fdd142ccacb61 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>model-parent</artifactId>
         <groupId>org.opendaylight.yangtools.model</groupId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index 9eaf12fda0a6c230a2fcc383057cb8c1d2e3329b..f34e9f27c4406a462e48321b6ecdc2d8f83d1d31 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>model-parent</artifactId>
         <groupId>org.opendaylight.yangtools.model</groupId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index aa88d705757fed6fe5eadd4e0a805384924f9039..5f2b31cd130f4c9fcdfcc1809068aa47f56a8719 100644 (file)
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.opendaylight.yangtools.model</groupId>
     <artifactId>model-parent</artifactId>
-    <version>0.5.7-SNAPSHOT</version>
+    <version>0.5.8-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>${project.artifactId}</name>
     <description>${project.artifactId}</description>
 
     <properties>
-        <yang.version>0.5.7-SNAPSHOT</yang.version>
+        <yang.version>0.5.8-SNAPSHOT</yang.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <maven.bundle.version>2.4.0</maven.bundle.version>
     </properties>
@@ -70,7 +70,7 @@
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>maven-sal-api-gen-plugin</artifactId>
-                        <version>0.5.7-SNAPSHOT</version>
+                        <version>0.5.8-SNAPSHOT</version>
                         <type>jar</type>
                     </dependency>
                 </dependencies>
diff --git a/pom.xml b/pom.xml
index 2d4d5fd37b5f4960e029516546b05a361578bd98..52c3f04cbf23a2fbb4017ecd665baeca6d096fff 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
         <slf4j.version>1.7.2</slf4j.version>\r
         <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>\r
-        <yang.version>0.5.7-SNAPSHOT</yang.version>\r
+        <yang.version>0.5.8-SNAPSHOT</yang.version>\r
         <maven.bundle.version>2.4.0</maven.bundle.version>\r
     </properties>\r
 \r
index 43e687cc60a299cc96006f494cb19daf5f639384..f3a6a180e9b31b199891751c3fce0fd8112f9bba 100644 (file)
@@ -9,7 +9,7 @@
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>yang</artifactId>
-    <version>0.5.7-SNAPSHOT</version>
+    <version>0.5.8-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <modules>
index 28eb9532241f793836b43c9995d80289f9249278..df120f5fb360e47102592c27ce7ba6b53d6c80fe 100644 (file)
@@ -4,7 +4,7 @@
        <parent>\r
                <groupId>org.opendaylight.yangtools</groupId>\r
                <artifactId>yang</artifactId>\r
-               <version>0.5.7-SNAPSHOT</version>\r
+               <version>0.5.8-SNAPSHOT</version>\r
        </parent>\r
        <packaging>bundle</packaging>\r
        <modelVersion>4.0.0</modelVersion>\r
index 0cbdf56482c354e33e3661f3ba11545fd7582e98..bc7d16bf1d103aa112e78a3c3f7ef5642d2d15e7 100644 (file)
@@ -4,7 +4,7 @@
        <parent>\r
                <groupId>org.opendaylight.yangtools</groupId>\r
                <artifactId>yang</artifactId>\r
-               <version>0.5.7-SNAPSHOT</version>\r
+               <version>0.5.8-SNAPSHOT</version>\r
        </parent>\r
        <packaging>bundle</packaging>\r
 \r
index e552e353bf087bc3c316558022b0375b330c3ee9..3c4b0ad82f7aff795aec0ec8398d14e0efadb14a 100644 (file)
@@ -4,7 +4,7 @@
     <parent>\r
         <groupId>org.opendaylight.yangtools</groupId>\r
         <artifactId>yang</artifactId>\r
-        <version>0.5.7-SNAPSHOT</version>\r
+        <version>0.5.8-SNAPSHOT</version>\r
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
index afa32728c5253740a6f6a1bf13bd18f84a371a36..c7125cfbef4022c60edede39de564571c5a34f4d 100644 (file)
@@ -4,7 +4,7 @@
     <parent>\r
         <groupId>org.opendaylight.yangtools</groupId>\r
         <artifactId>yang</artifactId>\r
-        <version>0.5.7-SNAPSHOT</version>\r
+        <version>0.5.8-SNAPSHOT</version>\r
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
@@ -52,7 +52,6 @@
         <dependency>\r
             <groupId>com.google.guava</groupId>\r
             <artifactId>guava</artifactId>\r
-            <version>14.0.1</version>\r
         </dependency>\r
         <dependency>\r
             <groupId>junit</groupId>\r
index d0bc4f601749a36cd194e1dcb8b697fbea226695..91d5839b2737aeab87377fcd9144ea892f52dd6c 100644 (file)
@@ -4,7 +4,7 @@
     <parent>\r
         <groupId>org.opendaylight.yangtools</groupId>\r
         <artifactId>yang</artifactId>\r
-        <version>0.5.7-SNAPSHOT</version>\r
+        <version>0.5.8-SNAPSHOT</version>\r
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
index 47bf7802a267577efb5df6eb1b2f26079954f129..564b975cf974f48600dacb87583bc11b8b44d75a 100644 (file)
@@ -4,7 +4,7 @@
     <parent>\r
         <groupId>org.opendaylight.yangtools</groupId>\r
         <artifactId>yang</artifactId>\r
-        <version>0.5.7-SNAPSHOT</version>\r
+        <version>0.5.8-SNAPSHOT</version>\r
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
@@ -55,7 +55,7 @@
                     <dependency>\r
                         <groupId>org.opendaylight.yangtools</groupId>\r
                         <artifactId>maven-sal-api-gen-plugin</artifactId>\r
-                        <version>0.5.7-SNAPSHOT</version>\r
+                        <version>0.5.8-SNAPSHOT</version>\r
                         <type>jar</type>\r
                     </dependency>\r
                 </dependencies>\r
index 16cb106e375a8b5a527c0c8d8da1c59d73dff856..de36b2f0e14f7292d17bbabcfd46436153a7c1b4 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>yang</artifactId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index 65e528cb401838c6a084a473875b0334b4ccafc9..eab0624935f6e600c347de13199b5e320a3acf20 100644 (file)
@@ -10,7 +10,7 @@
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>yang-maven-plugin-spi</artifactId>
-            <version>0.5.7-SNAPSHOT</version>
+            <version>0.5.8-SNAPSHOT</version>
         </dependency>
     </dependencies>
 
@@ -19,7 +19,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.7-SNAPSHOT</version>
+                <version>0.5.8-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -56,7 +56,7 @@
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.7-SNAPSHOT</version>
+                        <version>0.5.8-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index a3de618277d36d3b15a97689fa678a056be69f8b..e7babaca2e9213b7dc4776899e852275997fcf0e 100644 (file)
@@ -10,7 +10,7 @@
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>yang-maven-plugin-spi</artifactId>
-            <version>0.5.7-SNAPSHOT</version>
+            <version>0.5.8-SNAPSHOT</version>
         </dependency>
     </dependencies>
 
@@ -19,7 +19,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.7-SNAPSHOT</version>
+                <version>0.5.8-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -43,7 +43,7 @@
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.7-SNAPSHOT</version>
+                        <version>0.5.8-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index 1c83191745bda56c72c41b477988087fea6b06c4..cd228761661276e844ea753fbd03939a23b8f325 100644 (file)
@@ -11,7 +11,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.7-SNAPSHOT</version>
+                <version>0.5.8-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -35,7 +35,7 @@
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.7-SNAPSHOT</version>
+                        <version>0.5.8-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index 8f28c8442a2ebe04926d04eb11b883fd7d3287cf..46eae7a0e51e883ff6fd659dcad159e22bf16faf 100644 (file)
@@ -11,7 +11,7 @@
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>generator-test1</artifactId>
-            <version>0.5.7-SNAPSHOT</version>
+            <version>0.5.8-SNAPSHOT</version>
             <scope>system</scope>
             <systemPath>${project.basedir}/../GenerateTest1/target/generator-test1-0.5-SNAPSHOT.jar</systemPath>
         </dependency>
@@ -22,7 +22,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.7-SNAPSHOT</version>
+                <version>0.5.8-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -49,7 +49,7 @@
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.7-SNAPSHOT</version>
+                        <version>0.5.8-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index facddf2142c991e541f5c69d58e1f50012008130..145e39bbacbee989162ef7904ff956a273f309e5 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>binding-generator</artifactId>
         <groupId>org.opendaylight.yangtools</groupId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
     <artifactId>test</artifactId>
 
@@ -13,7 +13,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.7-SNAPSHOT</version>
+                <version>0.5.8-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -40,7 +40,7 @@
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.7-SNAPSHOT</version>
+                        <version>0.5.8-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index 7877e0c51531a9abed816d9c1d76951ac6394aa9..a61ffd93ea9baac25b977e9378c42c3d25ea00af 100644 (file)
@@ -11,7 +11,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.7-SNAPSHOT</version>
+                <version>0.5.8-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -48,7 +48,7 @@
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.7-SNAPSHOT</version>
+                        <version>0.5.8-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index 4d01bb4755bb75866aae82f338c4a38b790b359c..844e1b1514b2ca2cb8a6e54176d208ebe97920bd 100644 (file)
@@ -11,7 +11,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.7-SNAPSHOT</version>
+                <version>0.5.8-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -39,7 +39,7 @@
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.7-SNAPSHOT</version>
+                        <version>0.5.8-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index e48feb27babfcfc4545813459d0e2280bb621325..732ceea1c0ff0584d82c6d7ba7070b7d7cb31719 100644 (file)
@@ -11,7 +11,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.7-SNAPSHOT</version>
+                <version>0.5.8-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -35,7 +35,7 @@
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.7-SNAPSHOT</version>
+                        <version>0.5.8-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index 0654c376159c97efe12d4f2273f4bc8afeb6ce4b..80a0fe8537a608e4552c98c169a030d0de6b12c0 100644 (file)
@@ -11,7 +11,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.7-SNAPSHOT</version>
+                <version>0.5.8-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -38,7 +38,7 @@
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.7-SNAPSHOT</version>
+                        <version>0.5.8-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index 87a5df09602fbcb880cfcafe94af01bec005a91d..ce2ddfa88f7965e2cf88d7339977000baee37acf 100644 (file)
@@ -12,7 +12,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.7-SNAPSHOT</version>
+                <version>0.5.8-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -47,7 +47,7 @@
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.7-SNAPSHOT</version>
+                        <version>0.5.8-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index 527fb98180efc36e2f7bfc21af9188e0d518e560..f2fd04a1a5dbca7c35f0d4fe1eb67eaa1fe8f973 100644 (file)
@@ -12,7 +12,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.7-SNAPSHOT</version>
+                <version>0.5.8-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
index 977dadc06c85b98e0ab93c63c0de4be2adabb57b..5a43416a0964a33cd6c52e2e50d9998d45719528 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>yang</artifactId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index 9f8ad6309e8cd28855a4ab0d1174fac49d2643b2..fb0ab44b71b3a90f3d4b2eea0342927cceaf5df8 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>yang</artifactId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index 038b4b5c523624f7314e97dfc33a9741d3417fd1..60f3d22ce80205c77874d079ddf63451006fd868 100644 (file)
@@ -4,7 +4,7 @@
     <parent>\r
         <groupId>org.opendaylight.yangtools</groupId>\r
         <artifactId>yang</artifactId>\r
-        <version>0.5.7-SNAPSHOT</version>\r
+        <version>0.5.8-SNAPSHOT</version>\r
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
index 82764762cea990c0e23c09ea9d19c34052f5e1ea..0bed3b116508ebe16d6a5171097232e8c27e8574 100644 (file)
  *
  * <dt>length
  *   <dd>{@link org.opendaylight.yangtools.yang.model.api.type.LengthConstraint}
- *   <dd>{@link org.opendaylight.yangtools.yang.model.api.type.StringTypeDefinition#getLengthStatements()}
+ *   <dd>{@link org.opendaylight.yangtools.yang.model.api.type.StringTypeDefinition#getLengthConstraints()}
  *
  * <dt>list
  *   <dd>{@link org.opendaylight.yangtools.yang.model.api.ListSchemaNode}
  *
  * <dt>range
  *   <dd>{@link org.opendaylight.yangtools.yang.model.api.type.RangeConstraint}
- *   <dd>{@link org.opendaylight.yangtools.yang.model.api.type.IntegerTypeDefinition#getRangeStatements()}
- *   <dd>{@link org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinition#getRangeStatements()}
+ *   <dd>{@link org.opendaylight.yangtools.yang.model.api.type.IntegerTypeDefinition#getRangeConstraints()}
+ *   <dd>{@link org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinition#getRangeConstraints()}
  *
  * <dt>reference
  *   <dd>{@link org.opendaylight.yangtools.yang.model.api.SchemaNode#getReference()}
index e3ace5d6e10506df73c8bf5c67039dbc433c09a3..edf42c4d4bfb4287e53128fbb71e2502a509280d 100644 (file)
@@ -25,7 +25,7 @@ public interface DecimalTypeDefinition extends TypeDefinition<DecimalTypeDefinit
      *         the <code>range</code> which is substatement of the
      *         <code>type</code> statement
      */
-    List<RangeConstraint> getRangeStatements();
+    List<RangeConstraint> getRangeConstraints();
 
     /**
      * Returns integer between 1 and 18 inclusively. <br>
index badd4e04a89364c70bb1d6c70f0a61ea533ad002..4e3611eb6fb472d84017d50669bd0b9a14604761 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.yangtools.yang.model.api.type;
 
 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
 
-public interface EmptyTypeDefinition extends
-        TypeDefinition<EmptyTypeDefinition> {
+public interface EmptyTypeDefinition extends TypeDefinition<EmptyTypeDefinition> {
 
 }
index 03e29c5e04cdd04286640bad55cbbbde9b233afd..bf1bc26873c2ba2aa8fbbeb70f42cd58abd39fe0 100644 (file)
@@ -28,13 +28,12 @@ import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
  * The Integer Built-In Types are defined in <a
  * href="https://tools.ietf.org/html/rfc6020#section-9.2"> [RFC-6020]</a>
  */
-public interface IntegerTypeDefinition extends
-        TypeDefinition<IntegerTypeDefinition> {
+public interface IntegerTypeDefinition extends TypeDefinition<IntegerTypeDefinition> {
 
     /**
      * Returns Range Constraints defined for given Integer Type.
      *
      * @return Range Constraints defined for given Integer Type.
      */
-    List<RangeConstraint> getRangeStatements();
+    List<RangeConstraint> getRangeConstraints();
 }
index e1bf21ada41fd25c1571c811b397ed4b0a1462a7..b8fcb0b4e4b330274236dde93322f3602c7d09a8 100644 (file)
@@ -25,7 +25,7 @@ public interface StringTypeDefinition extends TypeDefinition<StringTypeDefinitio
      *         <code>lenght</code> substatement of the <code>type</code>
      *         statement
      */
-    List<LengthConstraint> getLengthStatements();
+    List<LengthConstraint> getLengthConstraints();
 
     /**
      * Returns patterns specified in the string.
@@ -34,5 +34,5 @@ public interface StringTypeDefinition extends TypeDefinition<StringTypeDefinitio
      *         <code>pattern</code> substatement of the <code>type</code>
      *         statement
      */
-    List<PatternConstraint> getPatterns();
+    List<PatternConstraint> getPatternConstraints();
 }
index 67704388ef39a3e0bc1cda2d28d5b413aca73201..b4fd6205ae4be3b62371f911eeaeee4b78c7f9d0 100644 (file)
@@ -11,19 +11,14 @@ import java.util.List;
 
 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
 
-public interface UnknownTypeDefinition extends
-        TypeDefinition<UnknownTypeDefinition> {
+public interface UnknownTypeDefinition extends TypeDefinition<UnknownTypeDefinition> {
 
-    List<RangeConstraint> getRangeStatements();
+    List<RangeConstraint> getRangeConstraints();
 
-    List<LengthConstraint> getLengthStatements();
+    List<LengthConstraint> getLengthConstraints();
 
-    List<PatternConstraint> getPatterns();
-
-    LengthConstraint getLengthConstraint();
+    List<PatternConstraint> getPatternConstraints();
 
     Integer getFractionDigits();
 
-    boolean isReferenceOnly();
-
 }
index 34315b1e83837878a8b4071a23b78de23bcb0f8d..b380044651022a4569e4b917e74bd666213606ed 100644 (file)
@@ -27,5 +27,5 @@ public interface UnsignedIntegerTypeDefinition extends TypeDefinition<UnsignedIn
      * @return list of <code>RangeConstraint</code> which represents the YANG
      *         <code>range</code> substatement arguments.
      */
-    List<RangeConstraint> getRangeStatements();
+    List<RangeConstraint> getRangeConstraints();
 }
index 799ac6bac8b1d7cd538eeebd7a206d79642bde38..1df6557080531c2f8c017321699051f73b5eba61 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>yang</artifactId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index 8dd79e6a2d82f68802f60998751a30fe4c858842..61647ddbfa31204a05e1d62e0436f0915df4651e 100644 (file)
@@ -23,7 +23,7 @@ import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
  * interface which represents SIGNED Integer values defined in Yang language. <br>
  * The integer built-in types in Yang are int8, int16, int32, int64. They
  * represent signed integers of different sizes:
- * 
+ *
  * <ul>
  * <li>int8 - represents integer values between -128 and 127, inclusively.</li>
  * <li>int16 - represents integer values between -32768 and 32767, inclusively.</li>
@@ -32,9 +32,9 @@ import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
  * <li>int64 - represents integer values between -9223372036854775808 and
  * 9223372036854775807, inclusively.</li>
  * </ul>
- * 
+ *
  */
-public abstract class AbstractSignedInteger implements IntegerTypeDefinition {
+abstract class AbstractSignedInteger implements IntegerTypeDefinition {
     private final QName name;
     private final SchemaPath path;
     private final String description;
@@ -61,6 +61,11 @@ public abstract class AbstractSignedInteger implements IntegerTypeDefinition {
                 "https://tools.ietf.org/html/rfc6020#section-9.2.4"));
     }
 
+    @Override
+    public IntegerTypeDefinition getBaseType() {
+        return null;
+    }
+
     @Override
     public String getUnits() {
         return units;
@@ -92,7 +97,7 @@ public abstract class AbstractSignedInteger implements IntegerTypeDefinition {
     }
 
     @Override
-    public List<RangeConstraint> getRangeStatements() {
+    public List<RangeConstraint> getRangeConstraints() {
         return rangeStatements;
     }
 
index 646fecb9b6d79ca913b28d568f42e37db4ed9bb4..df740b86c11e5d6e2a01fd5844a8adf2da75e6d0 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinit
  * interface which represents UNSIGNED Integer values defined in Yang language. <br>
  * The integer built-in types in Yang are uint8, uint16, uint32, and uint64.
  * They represent unsigned integers of different sizes:
- * 
+ *
  * <ul>
  * <li>uint8 - represents integer values between 0 and 255, inclusively.</li>
  * <li>uint16 - represents integer values between 0 and 65535, inclusively.</li>
@@ -28,9 +28,9 @@ import org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinit
  * <li>uint64 - represents integer values between 0 and 18446744073709551615,
  * inclusively.</li>
  * </ul>
- * 
+ *
  */
-public abstract class AbstractUnsignedInteger implements UnsignedIntegerTypeDefinition {
+abstract class AbstractUnsignedInteger implements UnsignedIntegerTypeDefinition {
     private static final long MIN_VALUE = 0;
     private final QName name;
     private final SchemaPath path;
@@ -40,7 +40,7 @@ public abstract class AbstractUnsignedInteger implements UnsignedIntegerTypeDefi
     private final List<RangeConstraint> rangeStatements;
 
     /**
-     * 
+     *
      * @param name
      * @param description
      * @param maxRange
@@ -57,6 +57,11 @@ public abstract class AbstractUnsignedInteger implements UnsignedIntegerTypeDefi
                 "https://tools.ietf.org/html/rfc6020#section-9.2.4"));
     }
 
+    @Override
+    public UnsignedIntegerTypeDefinition getBaseType() {
+        return null;
+    }
+
     @Override
     public String getUnits() {
         return units;
@@ -88,7 +93,7 @@ public abstract class AbstractUnsignedInteger implements UnsignedIntegerTypeDefi
     }
 
     @Override
-    public List<RangeConstraint> getRangeStatements() {
+    public List<RangeConstraint> getRangeConstraints() {
         return rangeStatements;
     }
 
index d7495ada748068042d4fe9b1d365190168c85abb..fa5c7aa4c539afbf8e47a170d6a4d90d071af99f 100644 (file)
@@ -20,7 +20,7 @@ import org.opendaylight.yangtools.yang.model.api.type.LengthConstraint;
 
 /**
  * The <code>default</code> implementation of Binary Type Definition interface.
- * 
+ *
  * @see BinaryTypeDefinition
  */
 public final class BinaryType implements BinaryTypeDefinition {
@@ -46,18 +46,18 @@ public final class BinaryType implements BinaryTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getBaseType()
      */
     @Override
     public BinaryTypeDefinition getBaseType() {
-        return this;
+        return null;
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.TypeDefinition#getUnits()
      */
     @Override
@@ -67,7 +67,7 @@ public final class BinaryType implements BinaryTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getDefaultValue
      * ()
@@ -79,7 +79,7 @@ public final class BinaryType implements BinaryTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getQName()
      */
     @Override
@@ -89,7 +89,7 @@ public final class BinaryType implements BinaryTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getPath()
      */
     @Override
@@ -99,7 +99,7 @@ public final class BinaryType implements BinaryTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.SchemaNode#getDescription()
      */
@@ -110,7 +110,7 @@ public final class BinaryType implements BinaryTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getReference()
      */
     @Override
@@ -120,7 +120,7 @@ public final class BinaryType implements BinaryTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getStatus()
      */
     @Override
@@ -130,7 +130,7 @@ public final class BinaryType implements BinaryTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.base.type.api.BinaryTypeDefinition
      * #getLengthConstraint ()
index cacfeb305ded07c22c5582878263877fdf9af428..c53df1bc6aa71259f030a996bc4259f2d8378518 100644 (file)
@@ -18,7 +18,7 @@ import org.opendaylight.yangtools.yang.model.api.type.BitsTypeDefinition;
 
 /**
  * The <code>default</code> implementation of Bits Type Definition interface.
- * 
+ *
  * @see BitsTypeDefinition
  */
 public final class BitsType implements BitsTypeDefinition {
@@ -29,26 +29,24 @@ public final class BitsType implements BitsTypeDefinition {
             + "numbers starting at 0.  Each bit number has an assigned name.";
 
     private static final String REFERENCE = "https://tools.ietf.org/html/rfc6020#section-9.7";
-    private final BitsTypeDefinition baseType;
     private final List<Bit> bits;
     private static final String UNITS = "";
 
     /**
      * Default constructor. <br>
      * Instantiates Bits type as empty bits list.
-     * 
+     *
      * @param path
      */
     public BitsType(final SchemaPath path) {
         super();
         this.bits = Collections.emptyList();
         this.path = path;
-        this.baseType = this;
     }
 
     /**
      * Constructor with explicit definition of bits assigned to BitsType.
-     * 
+     *
      * @param path
      * @param bits
      */
@@ -56,23 +54,22 @@ public final class BitsType implements BitsTypeDefinition {
         super();
         this.bits = Collections.unmodifiableList(bits);
         this.path = path;
-        this.baseType = this;
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getBaseType()
      */
     @Override
     public BitsTypeDefinition getBaseType() {
-        return baseType;
+        return null;
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.TypeDefinition#getUnits()
      */
     @Override
@@ -82,7 +79,7 @@ public final class BitsType implements BitsTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getDefaultValue
      * ()
@@ -94,7 +91,7 @@ public final class BitsType implements BitsTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getQName()
      */
     @Override
@@ -104,7 +101,7 @@ public final class BitsType implements BitsTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getPath()
      */
     @Override
@@ -114,7 +111,7 @@ public final class BitsType implements BitsTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.SchemaNode#getDescription()
      */
@@ -125,7 +122,7 @@ public final class BitsType implements BitsTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getReference()
      */
     @Override
@@ -135,7 +132,7 @@ public final class BitsType implements BitsTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getStatus()
      */
     @Override
index 9d7aff3366d5dcf62ffb4d79b4bcb4bca4d6c8a5..b4740884fb24743a4c3b3b5f6522da9d81a580de 100644 (file)
@@ -18,7 +18,7 @@ import org.opendaylight.yangtools.yang.model.api.type.BooleanTypeDefinition;
 
 /**
  * The <code>default</code> implementation of Boolean Type Definition interface.
- * 
+ *
  * @see BooleanTypeDefinition
  */
 public final class BooleanType implements BooleanTypeDefinition {
@@ -41,18 +41,18 @@ public final class BooleanType implements BooleanTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getBaseType()
      */
     @Override
     public BooleanTypeDefinition getBaseType() {
-        return this;
+        return null;
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.TypeDefinition#getUnits()
      */
     @Override
@@ -62,7 +62,7 @@ public final class BooleanType implements BooleanTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getDefaultValue
      * ()
@@ -74,7 +74,7 @@ public final class BooleanType implements BooleanTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getQName()
      */
     @Override
@@ -84,7 +84,7 @@ public final class BooleanType implements BooleanTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getPath()
      */
     @Override
@@ -94,7 +94,7 @@ public final class BooleanType implements BooleanTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.SchemaNode#getDescription()
      */
@@ -105,7 +105,7 @@ public final class BooleanType implements BooleanTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getReference()
      */
     @Override
@@ -115,7 +115,7 @@ public final class BooleanType implements BooleanTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getStatus()
      */
     @Override
index 64f1dc6e8ec49912b8eed68987200cc77897c615..666747915f3444becdf2e372b9fc9c15b6da1ab3 100644 (file)
@@ -21,8 +21,8 @@ import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
 
 /**
  * The <code>default</code> implementation of Decimal Type Definition interface.
- * 
- * 
+ *
+ *
  * @see DecimalTypeDefinition
  */
 public final class Decimal64 implements DecimalTypeDefinition {
@@ -40,7 +40,6 @@ public final class Decimal64 implements DecimalTypeDefinition {
 
     private final List<RangeConstraint> rangeStatements;
     private final Integer fractionDigits;
-    private final DecimalTypeDefinition baseType;
     private static final int MAX_NUMBER_OF_FRACTION_DIGITS = 18;
 
     /**
@@ -54,11 +53,11 @@ public final class Decimal64 implements DecimalTypeDefinition {
      * {@link DecimalTypeDefinition} <br>
      * If the fraction digits are not defined inner the definition boundaries
      * the constructor will throw {@link IllegalArgumentException}
-     * 
+     *
      * @param path
      * @param fractionDigits
      *            integer between 1 and 18 inclusively
-     * 
+     *
      * @see DecimalTypeDefinition
      * @exception IllegalArgumentException
      */
@@ -70,12 +69,11 @@ public final class Decimal64 implements DecimalTypeDefinition {
         this.fractionDigits = fractionDigits;
         rangeStatements = defaultRangeStatements();
         this.path = path;
-        this.baseType = this;
     }
 
     /**
      * Returns unmodifiable List with default definition of Range Statements.
-     * 
+     *
      * @return unmodifiable List with default definition of Range Statements.
      */
     private List<RangeConstraint> defaultRangeStatements() {
@@ -90,7 +88,7 @@ public final class Decimal64 implements DecimalTypeDefinition {
 
     @Override
     public DecimalTypeDefinition getBaseType() {
-        return baseType;
+        return null;
     }
 
     @Override
@@ -134,7 +132,7 @@ public final class Decimal64 implements DecimalTypeDefinition {
     }
 
     @Override
-    public List<RangeConstraint> getRangeStatements() {
+    public List<RangeConstraint> getRangeConstraints() {
         return rangeStatements;
     }
 
index ee56f760d49b7dff67bd4ba00ad81e7209be4d84..c4f78c621da82d23f7177d79d4a344cdfa18926c 100644 (file)
@@ -35,7 +35,7 @@ public final class EmptyType implements EmptyTypeDefinition {
 
     @Override
     public EmptyTypeDefinition getBaseType() {
-        return this;
+        return null;
     }
 
     @Override
index 3ae8eb346de99e78e63fceb7469ab3912917e07a..ea0e9f3fe1e250c1682f3b3b2e7b87db10fc9101 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition;
 /**
  * The <code>default</code> implementation of Enumertaion Type Definition
  * interface.
- * 
+ *
  * @see EnumTypeDefinition
  */
 public final class EnumerationType implements EnumTypeDefinition {
@@ -31,38 +31,35 @@ public final class EnumerationType implements EnumTypeDefinition {
     private final EnumPair defaultEnum;
     private final List<EnumPair> enums;
     private static final String UNITS = "";
-    private final EnumTypeDefinition baseType;
 
     public EnumerationType(final SchemaPath path, final List<EnumPair> enums) {
         super();
         this.path = path;
         this.enums = Collections.unmodifiableList(enums);
         this.defaultEnum = null;
-        this.baseType = this;
     }
 
     public EnumerationType(final SchemaPath path, final EnumPair defaultEnum, final List<EnumPair> enums) {
         super();
         this.path = path;
-        this.baseType = this;
         this.defaultEnum = defaultEnum;
         this.enums = Collections.unmodifiableList(enums);
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getBaseType()
      */
     @Override
     public EnumTypeDefinition getBaseType() {
-        return baseType;
+        return null;
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.TypeDefinition#getUnits()
      */
     @Override
@@ -72,7 +69,7 @@ public final class EnumerationType implements EnumTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getDefaultValue
      * ()
@@ -84,7 +81,7 @@ public final class EnumerationType implements EnumTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getQName()
      */
     @Override
@@ -94,7 +91,7 @@ public final class EnumerationType implements EnumTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getPath()
      */
     @Override
@@ -104,7 +101,7 @@ public final class EnumerationType implements EnumTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.SchemaNode#getDescription()
      */
@@ -115,7 +112,7 @@ public final class EnumerationType implements EnumTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getReference()
      */
     @Override
@@ -125,7 +122,7 @@ public final class EnumerationType implements EnumTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getStatus()
      */
     @Override
@@ -135,7 +132,7 @@ public final class EnumerationType implements EnumTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.base.type.api.EnumTypeDefinition
      * #getValues()
index 6e5229d4cb9d712552b47c4f31f254bbd8a7b80b..4c2c17b63ad2aae304dc0802d9f050f296bd18ee 100644 (file)
@@ -256,15 +256,15 @@ public class ExtendedType implements TypeDefinition<TypeDefinition<?>> {
         return builder.toString();
     }
 
-    public List<RangeConstraint> getRanges() {
+    public List<RangeConstraint> getRangeConstraints() {
         return ranges;
     }
 
-    public List<LengthConstraint> getLengths() {
+    public List<LengthConstraint> getLengthConstraints() {
         return lengths;
     }
 
-    public List<PatternConstraint> getPatterns() {
+    public List<PatternConstraint> getPatternConstraints() {
         return patterns;
     }
 
index 1156762cca83c9a1a583dcaf1e2acd6b5352c0a4..d7ba3dc771d5143c5536ae987acdf313e0a35664 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.yangtools.yang.model.api.type.IdentityrefTypeDefinition;
 /**
  * The <code>default</code> implementation of Identityref Type Definition
  * interface.
- * 
+ *
  * @see IdentityrefTypeDefinition
  */
 public final class IdentityrefType implements IdentityrefTypeDefinition {
@@ -27,14 +27,12 @@ public final class IdentityrefType implements IdentityrefTypeDefinition {
     private final SchemaPath path;
     private static final String DESCRIPTION = "The identityref type is used to reference an existing identity.";
     private static final String REFERENCE = "https://tools.ietf.org/html/rfc6020#section-9.10";
-    private final IdentityrefTypeDefinition baseType;
     private final QName identity;
     private static final String UNITS = "";
 
     public IdentityrefType(QName identity, SchemaPath schemaPath) {
         this.identity = identity;
         this.path = schemaPath;
-        this.baseType = this;
     }
 
     @Override
@@ -84,7 +82,7 @@ public final class IdentityrefType implements IdentityrefTypeDefinition {
 
     @Override
     public IdentityrefTypeDefinition getBaseType() {
-        return baseType;
+        return null;
     }
 
     @Override
index 4949d4ebeec24721bf6693b52e14e61b2699ea00..aae5b8ee1f52c32a6defc2dec33b2f25615370fd 100644 (file)
@@ -20,7 +20,7 @@ import org.opendaylight.yangtools.yang.model.api.type.InstanceIdentifierTypeDefi
 /**
  * The <code>default</code> implementation of Instance Identifier Type
  * Definition interface.
- * 
+ *
  * @see InstanceIdentifierTypeDefinition
  */
 public final class InstanceIdentifier implements InstanceIdentifierTypeDefinition {
@@ -48,18 +48,18 @@ public final class InstanceIdentifier implements InstanceIdentifierTypeDefinitio
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getBaseType()
      */
     @Override
     public InstanceIdentifierTypeDefinition getBaseType() {
-        return this;
+        return null;
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.TypeDefinition#getUnits()
      */
     @Override
@@ -69,7 +69,7 @@ public final class InstanceIdentifier implements InstanceIdentifierTypeDefinitio
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getDefaultValue
      * ()
@@ -81,7 +81,7 @@ public final class InstanceIdentifier implements InstanceIdentifierTypeDefinitio
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getQName()
      */
     @Override
@@ -91,7 +91,7 @@ public final class InstanceIdentifier implements InstanceIdentifierTypeDefinitio
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getPath()
      */
     @Override
@@ -101,7 +101,7 @@ public final class InstanceIdentifier implements InstanceIdentifierTypeDefinitio
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.SchemaNode#getDescription()
      */
@@ -112,7 +112,7 @@ public final class InstanceIdentifier implements InstanceIdentifierTypeDefinitio
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getReference()
      */
     @Override
@@ -122,7 +122,7 @@ public final class InstanceIdentifier implements InstanceIdentifierTypeDefinitio
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getStatus()
      */
     @Override
@@ -132,7 +132,7 @@ public final class InstanceIdentifier implements InstanceIdentifierTypeDefinitio
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.SchemaNode#getExtensionSchemaNodes
      * ()
@@ -144,7 +144,7 @@ public final class InstanceIdentifier implements InstanceIdentifierTypeDefinitio
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.type.
      * InstanceIdentifierTypeDefinition# getPathStatement()
      */
@@ -155,7 +155,7 @@ public final class InstanceIdentifier implements InstanceIdentifierTypeDefinitio
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.type.
      * InstanceIdentifierTypeDefinition# requireInstance()
      */
index d73bf754ff459f84fdbb1ce7f89c46f321aa14ae..63caa24500d6e285a685d80bc1a64ebcb992cfdb 100644 (file)
@@ -8,13 +8,12 @@
 package org.opendaylight.yangtools.yang.model.util;
 
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.type.IntegerTypeDefinition;
 
 /**
  * Implementation of Yang int16 built-in type. <br>
  * int16 represents integer values between -32768 and 32767, inclusively. The
  * Java counterpart of Yang int16 built-in type is {@link Short}.
- * 
+ *
  * @see AbstractSignedInteger
  */
 public final class Int16 extends AbstractSignedInteger {
@@ -33,11 +32,6 @@ public final class Int16 extends AbstractSignedInteger {
         return instance;
     }
 
-    @Override
-    public IntegerTypeDefinition getBaseType() {
-        return this;
-    }
-
     @Override
     public Object getDefaultValue() {
         return null;
index 799ca00d0c39f3439f3ab1309696fa8f9bbe2d75..b043d40a7ed7b443557e6a34fc3ccd379db0d1bb 100644 (file)
@@ -8,16 +8,15 @@
 package org.opendaylight.yangtools.yang.model.util;
 
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.type.IntegerTypeDefinition;
 
 /**
  * Implementation of Yang int32 built-in type. <br>
  * int32 represents integer values between -2147483648 and 2147483647,
  * inclusively. The Java counterpart of Yang int32 built-in type is
  * {@link Integer}.
- * 
+ *
  * @see AbstractSignedInteger
- * 
+ *
  */
 public final class Int32 extends AbstractSignedInteger {
     private static Int32 instance;
@@ -35,11 +34,6 @@ public final class Int32 extends AbstractSignedInteger {
         return instance;
     }
 
-    @Override
-    public IntegerTypeDefinition getBaseType() {
-        return this;
-    }
-
     @Override
     public Object getDefaultValue() {
         return null;
index a22d2d5a6c478a75cfc33996381c80e7fa9b03cd..5f4202254786df35c1a3c22609bdf50c7e78eb17 100644 (file)
@@ -8,14 +8,13 @@
 package org.opendaylight.yangtools.yang.model.util;
 
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.type.IntegerTypeDefinition;
 
 /**
  * Implementation of Yang int64 built-in type. <br>
  * int64 represents integer values between -9223372036854775808 and
  * 9223372036854775807, inclusively. The Java counterpart of Yang int64 built-in
  * type is {@link Long}.
- * 
+ *
  */
 public final class Int64 extends AbstractSignedInteger {
     private static Int64 instance;
@@ -33,11 +32,6 @@ public final class Int64 extends AbstractSignedInteger {
         return instance;
     }
 
-    @Override
-    public IntegerTypeDefinition getBaseType() {
-        return this;
-    }
-
     @Override
     public Object getDefaultValue() {
         return null;
index 16f7ee68f52cdea2246092f88f32572dc50fd977..5df2db696f39a1391fd71441016c93dde6d6df0e 100644 (file)
@@ -8,13 +8,12 @@
 package org.opendaylight.yangtools.yang.model.util;
 
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.type.IntegerTypeDefinition;
 
 /**
  * Implementation of Yang int8 built-in type. <br>
  * int8 represents integer values between -128 and 127, inclusively. The Java
  * counterpart of Yang int8 built-in type is {@link Byte}.
- * 
+ *
  * @see AbstractSignedInteger
  */
 public final class Int8 extends AbstractSignedInteger {
@@ -33,11 +32,6 @@ public final class Int8 extends AbstractSignedInteger {
         return instance;
     }
 
-    @Override
-    public IntegerTypeDefinition getBaseType() {
-        return this;
-    }
-
     @Override
     public Object getDefaultValue() {
         return null;
index f5a9bbf5595d1b2cffc2e83167aae4c3fdaaf57b..8ef325cfdf3bbc9aba90840b8b404d2c4bcdb0d9 100644 (file)
@@ -37,7 +37,7 @@ public final class Leafref implements LeafrefTypeDefinition {
 
     @Override
     public LeafrefTypeDefinition getBaseType() {
-        return this;
+        return null;
     }
 
     @Override
index 93f0c7c13c5bf58944fac59033a4f388cd5cd150..905278357eeec5ad191d912c2639d91d27189a33 100644 (file)
@@ -21,7 +21,7 @@ import org.opendaylight.yangtools.yang.model.api.type.StringTypeDefinition;
 
 /**
  * The <code>default</code> implementation of String Type Definition interface.
- * 
+ *
  * @see StringTypeDefinition
  */
 public final class StringType implements StringTypeDefinition {
@@ -51,18 +51,18 @@ public final class StringType implements StringTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getBaseType()
      */
     @Override
     public StringTypeDefinition getBaseType() {
-        return this;
+        return null;
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.TypeDefinition#getUnits()
      */
     @Override
@@ -72,7 +72,7 @@ public final class StringType implements StringTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getDefaultValue
      * ()
@@ -84,7 +84,7 @@ public final class StringType implements StringTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getQName()
      */
     @Override
@@ -94,7 +94,7 @@ public final class StringType implements StringTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getPath()
      */
     @Override
@@ -104,7 +104,7 @@ public final class StringType implements StringTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.SchemaNode#getDescription()
      */
@@ -115,7 +115,7 @@ public final class StringType implements StringTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getReference()
      */
     @Override
@@ -125,7 +125,7 @@ public final class StringType implements StringTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getStatus()
      */
     @Override
@@ -135,24 +135,24 @@ public final class StringType implements StringTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * com.csico.yang.model.base.type.api.StringTypeDefinition#getLengthStatements
      * ()
      */
     @Override
-    public List<LengthConstraint> getLengthStatements() {
+    public List<LengthConstraint> getLengthConstraints() {
         return lengthStatements;
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * com.csico.yang.model.base.type.api.StringTypeDefinition#getPatterns()
      */
     @Override
-    public List<PatternConstraint> getPatterns() {
+    public List<PatternConstraint> getPatternConstraints() {
         return patterns;
     }
 
index 120f4926cf875b6c0c90f398711d594dea810142..4c386c48d5b3988f083bb794f2840e745158746f 100644 (file)
@@ -8,13 +8,12 @@
 package org.opendaylight.yangtools.yang.model.util;
 
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinition;
 
 /**
  * Implementation of Yang uint16 built-in type. <br>
  * uint16 represents integer values between 0 and 65535, inclusively. The Java
  * counterpart of Yang uint16 built-in type is {@link Integer}.
- * 
+ *
  */
 public final class Uint16 extends AbstractUnsignedInteger {
     public static final int MAX_VALUE = 65535;
@@ -33,11 +32,6 @@ public final class Uint16 extends AbstractUnsignedInteger {
         return instance;
     }
 
-    @Override
-    public UnsignedIntegerTypeDefinition getBaseType() {
-        return this;
-    }
-
     @Override
     public Object getDefaultValue() {
         return null;
index 375a26bf918aa6c909480d1fb85f048ac21b93bc..dd3183d51bf028fdc605e3381f28fe7920224122 100644 (file)
@@ -8,12 +8,11 @@
 package org.opendaylight.yangtools.yang.model.util;
 
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinition;
 
 /**
  * Implementation of Yang uint32 built-in type. <br>
  * uint32 represents integer values between 0 and 4294967295, inclusively.
- * 
+ *
  */
 public final class Uint32 extends AbstractUnsignedInteger {
     public static final long MAX_VALUE = 4294967295L;
@@ -32,11 +31,6 @@ public final class Uint32 extends AbstractUnsignedInteger {
         return instance;
     }
 
-    @Override
-    public UnsignedIntegerTypeDefinition getBaseType() {
-        return this;
-    }
-
     @Override
     public Object getDefaultValue() {
         return null;
index e003873eb6641bd2e212b14b76907e42ea78cafc..555b76f5feb96ac74a99ee4d285a5edb707b9bae 100644 (file)
@@ -10,14 +10,13 @@ package org.opendaylight.yangtools.yang.model.util;
 import java.math.BigInteger;
 
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinition;
 
 /**
  * Implementation of Yang uint64 built-in type. <br>
  * uint64 represents integer values between 0 and 18446744073709551615,
  * inclusively. The Java counterpart of Yang uint64 built-in type is
  * {@link BigInteger}.
- * 
+ *
  */
 public final class Uint64 extends AbstractUnsignedInteger {
     public static final BigInteger MAX_VALUE = new BigInteger("18446744073709551615");
@@ -36,11 +35,6 @@ public final class Uint64 extends AbstractUnsignedInteger {
         return instance;
     }
 
-    @Override
-    public UnsignedIntegerTypeDefinition getBaseType() {
-        return this;
-    }
-
     @Override
     public Object getDefaultValue() {
         return null;
index 4c36ae1d906c7cfbe33065103bb56562c6b52a5d..2212585f0238e69746df6a75f79b2e86424077cd 100644 (file)
@@ -8,12 +8,11 @@
 package org.opendaylight.yangtools.yang.model.util;
 
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinition;
 
 /**
  * Implementation of Yang uint8 built-in type. <br>
  * uint8 represents integer values between 0 and 255, inclusively.
- * 
+ *
  * @see AbstractUnsignedInteger
  */
 public final class Uint8 extends AbstractUnsignedInteger {
@@ -33,11 +32,6 @@ public final class Uint8 extends AbstractUnsignedInteger {
         return instance;
     }
 
-    @Override
-    public UnsignedIntegerTypeDefinition getBaseType() {
-        return this;
-    }
-
     @Override
     public Object getDefaultValue() {
         return null;
index a12c1c1119ab0520843279d8e61617dbe0196cef..99390b09803a438152bba18f0cee6ceaf8e196b5 100644 (file)
@@ -33,7 +33,7 @@ public final class UnionType implements UnionTypeDefinition {
 
     @Override
     public UnionTypeDefinition getBaseType() {
-        return this;
+        return null;
     }
 
     @Override
index 748507f38a4953ad58c525688eb7c33c57abe5a9..23bb8395ca059cf83eeb61e7863a3e4d977d43d2 100644 (file)
@@ -25,7 +25,6 @@ public final class UnknownType implements UnknownTypeDefinition {
     private final SchemaPath path;
     private final String description;
     private final String reference;
-    private final boolean referenceOnly;
     private final List<LengthConstraint> lengthStatements;
     private final List<PatternConstraint> patterns;
     private final List<RangeConstraint> rangeStatements;
@@ -54,7 +53,6 @@ public final class UnknownType implements UnknownTypeDefinition {
         private Status status = Status.CURRENT;
         private String units = "";
         private Object defaultValue = null;
-        private boolean referenceOnly = false;
 
         public Builder(final QName name, final String description, final String reference) {
             this.name = name;
@@ -126,15 +124,9 @@ public final class UnknownType implements UnknownTypeDefinition {
         public UnknownTypeDefinition build() {
             return new UnknownType(this);
         }
-
-        public void setReferenceOnly(boolean b) {
-            this.referenceOnly = b;
-
-        }
     }
 
     private UnknownType(Builder builder) {
-        this.referenceOnly = builder.referenceOnly;
         this.name = builder.name;
         this.path = builder.path;
         this.description = builder.description;
@@ -152,7 +144,7 @@ public final class UnknownType implements UnknownTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getBaseType()
      */
@@ -163,7 +155,7 @@ public final class UnknownType implements UnknownTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.TypeDefinition#getUnits()
      */
     @Override
@@ -173,7 +165,7 @@ public final class UnknownType implements UnknownTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.TypeDefinition#getDefaultValue
      * ()
@@ -185,7 +177,7 @@ public final class UnknownType implements UnknownTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getQName()
      */
     @Override
@@ -195,7 +187,7 @@ public final class UnknownType implements UnknownTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getPath()
      */
     @Override
@@ -205,7 +197,7 @@ public final class UnknownType implements UnknownTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.SchemaNode#getDescription()
      */
@@ -216,7 +208,7 @@ public final class UnknownType implements UnknownTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getReference()
      */
     @Override
@@ -226,7 +218,7 @@ public final class UnknownType implements UnknownTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.SchemaNode#getStatus()
      */
     @Override
@@ -236,7 +228,7 @@ public final class UnknownType implements UnknownTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.opendaylight.yangtools.yang.model.api.SchemaNode#getExtensionSchemaNodes
      * ()
@@ -248,58 +240,42 @@ public final class UnknownType implements UnknownTypeDefinition {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.type.UnknownTypeDefinition
      * #getRangeStatements()
      */
     @Override
-    public List<RangeConstraint> getRangeStatements() {
+    public List<RangeConstraint> getRangeConstraints() {
         return rangeStatements;
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.type.UnknownTypeDefinition
      * #getLengthStatements()
      */
     @Override
-    public List<LengthConstraint> getLengthStatements() {
+    public List<LengthConstraint> getLengthConstraints() {
         return lengthStatements;
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.opendaylight.yangtools.yang.model.api.type.UnknownTypeDefinition
      * #getPatterns()
      */
     @Override
-    public List<PatternConstraint> getPatterns() {
+    public List<PatternConstraint> getPatternConstraints() {
         return patterns;
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.opendaylight.yangtools.yang.model.api.type.UnknownTypeDefinition
-     * #getLengthConstraint()
-     */
-    @Override
-    public LengthConstraint getLengthConstraint() {
-        return lengthConstraint;
-    }
-
     @Override
     public Integer getFractionDigits() {
         return fractionDigits;
     }
 
-    @Override
-    public boolean isReferenceOnly() {
-        return referenceOnly;
-    }
-
     @Override
     public int hashCode() {
         final int prime = 31;
index aab41b8534bc6592af91fd0fb442193185c98001..2fc4bea95ea37766dd4a48b7bd5e643a184ff119 100644 (file)
@@ -1,6 +1,7 @@
 package org.opendaylight.yangtools.yang.model.util;
 
 import static org.junit.Assert.*;
+
 import org.junit.Test;
 
 public class Int8Test {
@@ -10,7 +11,7 @@ public class Int8Test {
         Int8 int8 = Int8.getInstance();
         Int8 int8Second = Int8.getInstance();
         assertTrue("The method 'getInstance()' has to return the same instance", int8 == int8Second);
-        assertTrue("The method 'getBaseType()' is returning incorrect value", int8.getBaseType() == int8);
+        assertTrue("The method 'getBaseType()' is returning incorrect value", int8.getBaseType() == null);
         assertTrue("The method 'getDefaultType()' is returning incorrect value", int8.getDefaultValue() == null);
         assertEquals("The method 'toString()' is returning incorrect value",
                 "type (urn:ietf:params:xml:ns:yang:1)int8", int8.toString());
index 8d294616a908dd9e8207b73fd720eed703678421..9c0235835142baadde28efb574483e51d610c211 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>yang</artifactId>
-        <version>0.5.7-SNAPSHOT</version>
+        <version>0.5.8-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index 88ef7280f91b0e49ea18bb41c832f50274f93d97..c15ee822549e4879e062fda1ca09c228da10b2de 100644 (file)
@@ -4,7 +4,7 @@
     <parent>\r
         <groupId>org.opendaylight.yangtools</groupId>\r
         <artifactId>yang</artifactId>\r
-        <version>0.5.7-SNAPSHOT</version>\r
+        <version>0.5.8-SNAPSHOT</version>\r
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
index 64f19e36bc92be8f234dd01dcb0806b1a51a344c..9e1ccd897e176f97c5ace33bcb5aff214eef6ca7 100644 (file)
@@ -626,9 +626,9 @@ public final class CopyUtils {
         builder.setDescription(typedef.getDescription());
         builder.setReference(typedef.getReference());
         builder.setStatus(typedef.getStatus());
-        builder.setRanges(typedef.getRanges());
-        builder.setLengths(typedef.getLengths());
-        builder.setPatterns(typedef.getPatterns());
+        builder.setRanges(typedef.getRangeConstraints());
+        builder.setLengths(typedef.getLengthConstraints());
+        builder.setPatterns(typedef.getPatternConstraints());
         builder.setFractionDigits(typedef.getFractionDigits());
         final TypeDefinition<?> type = typedef.getBaseType();
         builder.setType(type);
index 45d46c69bb9b3cee186496e47f705ef9f2fe6c71..505fa97dee12ef3c4e633b3f388d542220de1e00 100644 (file)
@@ -127,7 +127,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse given tree and get first string value.
-     * 
+     *
      * @param treeNode
      *            tree to parse
      * @return first string value from given tree
@@ -148,7 +148,7 @@ public final class ParserListenerUtils {
     /**
      * Parse 'description', 'reference' and 'status' statements and fill in
      * given builder.
-     * 
+     *
      * @param ctx
      *            context to parse
      * @param builder
@@ -172,7 +172,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse given context and return its value;
-     * 
+     *
      * @param ctx
      *            status context
      * @return value parsed from context
@@ -199,7 +199,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse given tree and returns units statement as string.
-     * 
+     *
      * @param ctx
      *            context to parse
      * @return value of units statement as string or null if there is no units
@@ -219,7 +219,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse given tree and returns default statement as string.
-     * 
+     *
      * @param ctx
      *            context to parse
      * @return value of default statement as string or null if there is no
@@ -239,7 +239,7 @@ public final class ParserListenerUtils {
 
     /**
      * Create SchemaPath from actualPath and new node name.
-     * 
+     *
      * @param actualPath
      *            current position in model
      * @return SchemaPath object
@@ -252,7 +252,7 @@ public final class ParserListenerUtils {
     /**
      * Create java.util.List of QName objects from given key definition as
      * string.
-     * 
+     *
      * @param keyDefinition
      *            key definition as string
      * @param namespace
@@ -280,7 +280,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse given type body of enumeration statement.
-     * 
+     *
      * @param ctx
      *            type body context to parse
      * @param path
@@ -314,7 +314,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse enum statement context
-     * 
+     *
      * @param ctx
      *            enum statement context
      * @param highestValue
@@ -491,7 +491,7 @@ public final class ParserListenerUtils {
 
     /**
      * Get and parse range from given type body context.
-     * 
+     *
      * @param ctx
      *            type body context to parse
      * @param moduleName
@@ -516,7 +516,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse given range context.
-     * 
+     *
      * @param ctx
      *            range context to parse
      * @param moduleName
@@ -559,7 +559,7 @@ public final class ParserListenerUtils {
 
     /**
      * Get and parse length from given type body context.
-     * 
+     *
      * @param ctx
      *            type body context to parse
      * @param moduleName
@@ -584,7 +584,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse given length context.
-     * 
+     *
      * @param ctx
      *            length context to parse
      * @param moduleName
@@ -651,7 +651,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse type body and return pattern constraints.
-     * 
+     *
      * @param ctx
      *            type body
      * @return list of pattern constraints
@@ -675,7 +675,7 @@ public final class ParserListenerUtils {
 
     /**
      * Internal helper method.
-     * 
+     *
      * @param ctx
      *            pattern context
      * @return PatternConstraint object
@@ -697,7 +697,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse given context and return pattern value.
-     * 
+     *
      * @param ctx
      *            context to parse
      * @return pattern value as String
@@ -720,7 +720,7 @@ public final class ParserListenerUtils {
 
     /**
      * Get fraction digits value from type body.
-     * 
+     *
      * @param ctx
      *            type body context to parse
      * @param moduleName
@@ -741,7 +741,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse decimal64 fraction-digits value.
-     * 
+     *
      * @param ctx
      *            decimal64 context
      * @param moduleName
@@ -768,7 +768,7 @@ public final class ParserListenerUtils {
     /**
      * Internal helper method for parsing bit statements from given type body
      * context.
-     * 
+     *
      * @param ctx
      *            type body context to parse
      * @param actualPath
@@ -801,7 +801,7 @@ public final class ParserListenerUtils {
 
     /**
      * Internal helper method for parsing bit context.
-     * 
+     *
      * @param ctx
      *            bit statement context to parse
      * @param highestPosition
@@ -852,11 +852,11 @@ public final class ParserListenerUtils {
 
     /**
      * Parse 'ordered-by' statement.
-     * 
+     *
      * The 'ordered-by' statement defines whether the order of entries within a
      * list are determined by the user or the system. The argument is one of the
      * strings "system" or "user". If not present, order defaults to "system".
-     * 
+     *
      * @param ctx
      *            Ordered_by_stmtContext
      * @return true, if ordered-by contains value 'user', false otherwise
@@ -882,7 +882,7 @@ public final class ParserListenerUtils {
     /**
      * Get config statement from given context. If there is no config statement,
      * return config value of parent
-     * 
+     *
      * @param ctx
      *            context to parse
      * @param parent
@@ -946,7 +946,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse config statement.
-     * 
+     *
      * @param ctx
      *            config context to parse
      * @param moduleName
@@ -978,7 +978,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse type body and create UnknownType definition.
-     * 
+     *
      * @param typedefQName
      *            qname of current type
      * @param ctx
@@ -1026,8 +1026,6 @@ public final class ParserListenerUtils {
 
                 return result;
             }
-        } else {
-            unknownType.setReferenceOnly(true);
         }
 
         return unknownType.build();
@@ -1035,7 +1033,7 @@ public final class ParserListenerUtils {
 
     /**
      * Create TypeDefinition object based on given type name and type body.
-     * 
+     *
      * @param typeName
      *            name of type
      * @param typeBody
@@ -1087,7 +1085,7 @@ public final class ParserListenerUtils {
                 }
             }
             Decimal64 decimalType = new Decimal64(extBaseTypePath, fractionDigits);
-            constraints.addRanges(decimalType.getRangeStatements());
+            constraints.addRanges(decimalType.getRangeConstraints());
             baseType = decimalType;
         } else if (typeName.startsWith("int")) {
             IntegerTypeDefinition intType = null;
@@ -1103,7 +1101,7 @@ public final class ParserListenerUtils {
             if (intType == null) {
                 throw new YangParseException(moduleName, line, "Unknown yang type " + typeName);
             }
-            constraints.addRanges(intType.getRangeStatements());
+            constraints.addRanges(intType.getRangeConstraints());
             baseType = intType;
         } else if (typeName.startsWith("uint")) {
             UnsignedIntegerTypeDefinition uintType = null;
@@ -1119,14 +1117,14 @@ public final class ParserListenerUtils {
             if (uintType == null) {
                 throw new YangParseException(moduleName, line, "Unknown yang type " + typeName);
             }
-            constraints.addRanges(uintType.getRangeStatements());
+            constraints.addRanges(uintType.getRangeConstraints());
             baseType = uintType;
         } else if ("enumeration".equals(typeName)) {
             List<EnumTypeDefinition.EnumPair> enumConstants = getEnumConstants(typeBody, actualPath, moduleName);
             return new EnumerationType(baseTypePath, enumConstants);
         } else if ("string".equals(typeName)) {
             StringTypeDefinition stringType = StringType.getIntance();
-            constraints.addLengths(stringType.getLengthStatements());
+            constraints.addLengths(stringType.getLengthConstraints());
             baseType = stringType;
         } else if ("bits".equals(typeName)) {
             return new BitsType(baseTypePath, getBits(typeBody, actualPath, moduleName));
@@ -1198,7 +1196,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse given context and find identityref base value.
-     * 
+     *
      * @param ctx
      *            type body
      * @return identityref base value as String
@@ -1222,7 +1220,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse type body statement and find require-instance value.
-     * 
+     *
      * @param ctx
      *            type body context
      * @return require-instance value
@@ -1249,7 +1247,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse type body statement and find leafref path.
-     * 
+     *
      * @param ctx
      *            type body context
      * @return leafref path as String
@@ -1271,7 +1269,7 @@ public final class ParserListenerUtils {
 
     /**
      * Internal helper method for parsing must statement.
-     * 
+     *
      * @param ctx
      *            Must_stmtContext
      * @return MustDefinition object based on parsed context
@@ -1320,7 +1318,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse given context and set constraints to constraints builder.
-     * 
+     *
      * @param ctx
      *            context to parse
      * @param constraints
@@ -1390,7 +1388,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse given context and return yin value.
-     * 
+     *
      * @param ctx
      *            context to parse
      * @return true if value is 'true', false otherwise
@@ -1417,7 +1415,7 @@ public final class ParserListenerUtils {
 
     /**
      * Check this base type.
-     * 
+     *
      * @param typeName
      *            base YANG type name
      * @param moduleName
@@ -1448,7 +1446,7 @@ public final class ParserListenerUtils {
 
     /**
      * Parse refine statement.
-     * 
+     *
      * @param refineCtx
      *            refine statement
      * @param moduleName
index e4095d462758f2c1d9bff30e70a57743e57d6205..e521f699aad19467888f5af032bbeb98f8de4da8 100644 (file)
@@ -306,20 +306,20 @@ public final class TypeUtils {
      */
     private static TypeConstraints mergeConstraints(final TypeDefinition<?> type, final TypeConstraints constraints) {
         if (type instanceof DecimalTypeDefinition) {
-            constraints.addRanges(((DecimalTypeDefinition) type).getRangeStatements());
+            constraints.addRanges(((DecimalTypeDefinition) type).getRangeConstraints());
             constraints.addFractionDigits(((DecimalTypeDefinition) type).getFractionDigits());
         } else if (type instanceof IntegerTypeDefinition) {
-            constraints.addRanges(((IntegerTypeDefinition) type).getRangeStatements());
+            constraints.addRanges(((IntegerTypeDefinition) type).getRangeConstraints());
         } else if (type instanceof StringTypeDefinition) {
-            constraints.addPatterns(((StringTypeDefinition) type).getPatterns());
-            constraints.addLengths(((StringTypeDefinition) type).getLengthStatements());
+            constraints.addPatterns(((StringTypeDefinition) type).getPatternConstraints());
+            constraints.addLengths(((StringTypeDefinition) type).getLengthConstraints());
         } else if (type instanceof BinaryTypeDefinition) {
             constraints.addLengths(((BinaryTypeDefinition) type).getLengthConstraints());
         } else if (type instanceof ExtendedType) {
             constraints.addFractionDigits(((ExtendedType) type).getFractionDigits());
-            constraints.addLengths(((ExtendedType) type).getLengths());
-            constraints.addPatterns(((ExtendedType) type).getPatterns());
-            constraints.addRanges(((ExtendedType) type).getRanges());
+            constraints.addLengths(((ExtendedType) type).getLengthConstraints());
+            constraints.addPatterns(((ExtendedType) type).getPatternConstraints());
+            constraints.addRanges(((ExtendedType) type).getRangeConstraints());
         }
         return constraints;
     }
@@ -356,9 +356,9 @@ public final class TypeUtils {
         TypeConstraints constraints = null;
         if (newBaseType == null) {
             tc.addFractionDigits(oldExtendedType.getFractionDigits());
-            tc.addLengths(oldExtendedType.getLengths());
-            tc.addPatterns(oldExtendedType.getPatterns());
-            tc.addRanges(oldExtendedType.getRanges());
+            tc.addLengths(oldExtendedType.getLengthConstraints());
+            tc.addPatterns(oldExtendedType.getPatternConstraints());
+            tc.addRanges(oldExtendedType.getRangeConstraints());
             constraints = findConstraintsFromTypeBuilder(newBaseTypeBuilder, tc, modules, module, null);
             newType.setTypedef(newBaseTypeBuilder);
         } else {
@@ -399,9 +399,9 @@ public final class TypeUtils {
         if (typeToResolve instanceof ExtendedType) {
             ExtendedType extType = (ExtendedType) typeToResolve;
             constraints.addFractionDigits(extType.getFractionDigits());
-            constraints.addLengths(extType.getLengths());
-            constraints.addPatterns(extType.getPatterns());
-            constraints.addRanges(extType.getRanges());
+            constraints.addLengths(extType.getLengthConstraints());
+            constraints.addPatterns(extType.getPatternConstraints());
+            constraints.addRanges(extType.getRangeConstraints());
             return findConstraintsFromTypeDefinition(extType.getBaseType(), constraints);
         } else {
             mergeConstraints(typeToResolve, constraints);
index 62304cdd6f26f7bfeaa7ab58e1c8aee9eb68525f..70e7ea229fd226523dc8fcdad9259ad60915de06 100644 (file)
@@ -115,11 +115,11 @@ public class TypesResolutionTest {
         assertTrue(ipv4.getBaseType() instanceof StringTypeDefinition);
         String expectedPattern = "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}"
                 + "([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])" + "(%[\\p{N}\\p{L}]+)?";
-        assertEquals(expectedPattern, ipv4.getPatterns().get(0).getRegularExpression());
+        assertEquals(expectedPattern, ipv4.getPatternConstraints().get(0).getRegularExpression());
 
         ExtendedType ipv6 = (ExtendedType) unionTypes.get(1);
         assertTrue(ipv6.getBaseType() instanceof StringTypeDefinition);
-        List<PatternConstraint> ipv6Patterns = ipv6.getPatterns();
+        List<PatternConstraint> ipv6Patterns = ipv6.getPatternConstraints();
         expectedPattern = "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}"
                 + "((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|" + "(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}"
                 + "(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))" + "(%[\\p{N}\\p{L}]+)?";
@@ -136,15 +136,15 @@ public class TypesResolutionTest {
         Set<TypeDefinition<?>> typedefs = tested.getTypeDefinitions();
         ExtendedType type = (ExtendedType) TestUtils.findTypedef(typedefs, "domain-name");
         assertTrue(type.getBaseType() instanceof StringTypeDefinition);
-        List<PatternConstraint> patterns = type.getPatterns();
+        List<PatternConstraint> patterns = type.getPatternConstraints();
         assertEquals(1, patterns.size());
         String expectedPattern = "((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*"
                 + "([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)" + "|\\.";
         assertEquals(expectedPattern, patterns.get(0).getRegularExpression());
 
-        List<LengthConstraint> lengths = type.getLengths();
+        List<LengthConstraint> lengths = type.getLengthConstraints();
         assertEquals(1, lengths.size());
-        LengthConstraint length = type.getLengths().get(0);
+        LengthConstraint length = type.getLengthConstraints().get(0);
         assertEquals(1L, length.getMin());
         assertEquals(253L, length.getMax());
     }
@@ -266,7 +266,7 @@ public class TypesResolutionTest {
         Set<TypeDefinition<?>> typedefs = tested.getTypeDefinitions();
         ExtendedType testedType = (ExtendedType) TestUtils.findTypedef(typedefs, "object-identifier-128");
 
-        List<PatternConstraint> patterns = testedType.getPatterns();
+        List<PatternConstraint> patterns = testedType.getPatternConstraints();
         assertEquals(1, patterns.size());
         PatternConstraint pattern = patterns.get(0);
         assertEquals("\\d*(\\.\\d*){1,127}", pattern.getRegularExpression());
@@ -278,7 +278,7 @@ public class TypesResolutionTest {
         assertEquals("object-identifier-128", testedTypeQName.getLocalName());
 
         ExtendedType testedTypeBase = (ExtendedType) testedType.getBaseType();
-        patterns = testedTypeBase.getPatterns();
+        patterns = testedTypeBase.getPatternConstraints();
         assertEquals(1, patterns.size());
 
         pattern = patterns.get(0);
index 15f6ca805fc428e986e86da6ac716fa47b862766..d946e07356fb521745f742397f80fe93df0808eb 100644 (file)
@@ -238,9 +238,9 @@ public class YangParserTest {
         assertEquals(nodesRev, leafTypeQName.getRevision());
         assertNull(leafType.getUnits());
         assertNull(leafType.getDefaultValue());
-        assertTrue(leafType.getLengths().isEmpty());
-        assertTrue(leafType.getPatterns().isEmpty());
-        List<RangeConstraint> ranges = leafType.getRanges();
+        assertTrue(leafType.getLengthConstraints().isEmpty());
+        assertTrue(leafType.getPatternConstraints().isEmpty());
+        List<RangeConstraint> ranges = leafType.getRangeConstraints();
         assertEquals(1, ranges.size());
         RangeConstraint range = ranges.get(0);
         assertEquals(12L, range.getMin());
@@ -254,9 +254,9 @@ public class YangParserTest {
         assertEquals(typesRev, baseTypeQName.getRevision());
         assertEquals("mile", baseType.getUnits());
         assertEquals("11", baseType.getDefaultValue());
-        assertTrue(leafType.getLengths().isEmpty());
-        assertTrue(leafType.getPatterns().isEmpty());
-        List<RangeConstraint> baseTypeRanges = baseType.getRanges();
+        assertTrue(leafType.getLengthConstraints().isEmpty());
+        assertTrue(leafType.getPatternConstraints().isEmpty());
+        List<RangeConstraint> baseTypeRanges = baseType.getRangeConstraints();
         assertEquals(2, baseTypeRanges.size());
         RangeConstraint baseTypeRange1 = baseTypeRanges.get(0);
         assertEquals(3L, baseTypeRange1.getMin());
@@ -273,9 +273,9 @@ public class YangParserTest {
         assertEquals(typesRev, baseQName.getRevision());
         assertNull(base.getUnits());
         assertNull(base.getDefaultValue());
-        assertTrue(leafType.getLengths().isEmpty());
-        assertTrue(leafType.getPatterns().isEmpty());
-        List<RangeConstraint> baseRanges = base.getRanges();
+        assertTrue(leafType.getLengthConstraints().isEmpty());
+        assertTrue(leafType.getPatternConstraints().isEmpty());
+        List<RangeConstraint> baseRanges = base.getRangeConstraints();
         assertEquals(1, baseRanges.size());
         RangeConstraint baseRange = baseRanges.get(0);
         assertEquals(2L, baseRange.getMin());
@@ -297,12 +297,12 @@ public class YangParserTest {
         assertEquals(typesRev, typeQName.getRevision());
         assertNull(type.getUnits());
         assertNull(type.getDefaultValue());
-        List<PatternConstraint> patterns = type.getPatterns();
+        List<PatternConstraint> patterns = type.getPatternConstraints();
         assertEquals(1, patterns.size());
         PatternConstraint pattern = patterns.iterator().next();
         assertEquals("[e-z]*", pattern.getRegularExpression());
-        assertTrue(type.getLengths().isEmpty());
-        assertTrue(type.getRanges().isEmpty());
+        assertTrue(type.getLengthConstraints().isEmpty());
+        assertTrue(type.getRangeConstraints().isEmpty());
 
         ExtendedType baseType1 = (ExtendedType) type.getBaseType();
         QName baseType1QName = baseType1.getQName();
@@ -312,12 +312,12 @@ public class YangParserTest {
         assertEquals(typesRev, baseType1QName.getRevision());
         assertNull(baseType1.getUnits());
         assertNull(baseType1.getDefaultValue());
-        patterns = baseType1.getPatterns();
+        patterns = baseType1.getPatternConstraints();
         assertEquals(1, patterns.size());
         pattern = patterns.iterator().next();
         assertEquals("[b-u]*", pattern.getRegularExpression());
-        assertTrue(baseType1.getLengths().isEmpty());
-        assertTrue(baseType1.getRanges().isEmpty());
+        assertTrue(baseType1.getLengthConstraints().isEmpty());
+        assertTrue(baseType1.getRangeConstraints().isEmpty());
 
         ExtendedType baseType2 = (ExtendedType) baseType1.getBaseType();
         QName baseType2QName = baseType2.getQName();
@@ -327,13 +327,13 @@ public class YangParserTest {
         assertEquals(typesRev, baseType2QName.getRevision());
         assertNull(baseType2.getUnits());
         assertNull(baseType2.getDefaultValue());
-        assertTrue(baseType2.getPatterns().isEmpty());
-        List<LengthConstraint> baseType2Lengths = baseType2.getLengths();
+        assertTrue(baseType2.getPatternConstraints().isEmpty());
+        List<LengthConstraint> baseType2Lengths = baseType2.getLengthConstraints();
         assertEquals(1, baseType2Lengths.size());
         LengthConstraint length = baseType2Lengths.get(0);
         assertEquals(6L, length.getMin());
         assertEquals(10L, length.getMax());
-        assertTrue(baseType2.getRanges().isEmpty());
+        assertTrue(baseType2.getRangeConstraints().isEmpty());
 
         ExtendedType baseType3 = (ExtendedType) baseType2.getBaseType();
         QName baseType3QName = baseType3.getQName();
@@ -343,16 +343,16 @@ public class YangParserTest {
         assertEquals(typesRev, baseType3QName.getRevision());
         assertNull(baseType3.getUnits());
         assertNull(baseType3.getDefaultValue());
-        patterns = baseType3.getPatterns();
+        patterns = baseType3.getPatternConstraints();
         assertEquals(1, patterns.size());
         pattern = patterns.iterator().next();
         assertEquals("[a-k]*", pattern.getRegularExpression());
-        List<LengthConstraint> baseType3Lengths = baseType3.getLengths();
+        List<LengthConstraint> baseType3Lengths = baseType3.getLengthConstraints();
         assertEquals(1, baseType3Lengths.size());
         length = baseType3Lengths.get(0);
         assertEquals(5L, length.getMin());
         assertEquals(11L, length.getMax());
-        assertTrue(baseType3.getRanges().isEmpty());
+        assertTrue(baseType3.getRangeConstraints().isEmpty());
 
         assertTrue(baseType3.getBaseType() instanceof StringType);
     }
@@ -371,13 +371,13 @@ public class YangParserTest {
         assertEquals(nodesRev, typeQName.getRevision());
         assertNull(type.getUnits());
         assertNull(type.getDefaultValue());
-        assertTrue(type.getPatterns().isEmpty());
-        List<LengthConstraint> typeLengths = type.getLengths();
+        assertTrue(type.getPatternConstraints().isEmpty());
+        List<LengthConstraint> typeLengths = type.getLengthConstraints();
         assertEquals(1, typeLengths.size());
         LengthConstraint length = typeLengths.get(0);
         assertEquals(7L, length.getMin());
         assertEquals(10L, length.getMax());
-        assertTrue(type.getRanges().isEmpty());
+        assertTrue(type.getRangeConstraints().isEmpty());
 
         ExtendedType baseType1 = (ExtendedType) type.getBaseType();
         QName baseType1QName = baseType1.getQName();
@@ -387,13 +387,13 @@ public class YangParserTest {
         assertEquals(typesRev, baseType1QName.getRevision());
         assertNull(baseType1.getUnits());
         assertNull(baseType1.getDefaultValue());
-        assertTrue(baseType1.getPatterns().isEmpty());
-        List<LengthConstraint> baseType2Lengths = baseType1.getLengths();
+        assertTrue(baseType1.getPatternConstraints().isEmpty());
+        List<LengthConstraint> baseType2Lengths = baseType1.getLengthConstraints();
         assertEquals(1, baseType2Lengths.size());
         length = baseType2Lengths.get(0);
         assertEquals(6L, length.getMin());
         assertEquals(10L, length.getMax());
-        assertTrue(baseType1.getRanges().isEmpty());
+        assertTrue(baseType1.getRangeConstraints().isEmpty());
 
         ExtendedType baseType2 = (ExtendedType) baseType1.getBaseType();
         QName baseType2QName = baseType2.getQName();
@@ -403,16 +403,16 @@ public class YangParserTest {
         assertEquals(typesRev, baseType2QName.getRevision());
         assertNull(baseType2.getUnits());
         assertNull(baseType2.getDefaultValue());
-        List<PatternConstraint> patterns = baseType2.getPatterns();
+        List<PatternConstraint> patterns = baseType2.getPatternConstraints();
         assertEquals(1, patterns.size());
         PatternConstraint pattern = patterns.iterator().next();
         assertEquals("[a-k]*", pattern.getRegularExpression());
-        List<LengthConstraint> baseType3Lengths = baseType2.getLengths();
+        List<LengthConstraint> baseType3Lengths = baseType2.getLengthConstraints();
         assertEquals(1, baseType3Lengths.size());
         length = baseType3Lengths.get(0);
         assertEquals(5L, length.getMin());
         assertEquals(11L, length.getMax());
-        assertTrue(baseType2.getRanges().isEmpty());
+        assertTrue(baseType2.getRangeConstraints().isEmpty());
 
         assertTrue(baseType2.getBaseType() instanceof StringType);
     }
@@ -431,9 +431,9 @@ public class YangParserTest {
         assertNull(type.getUnits());
         assertNull(type.getDefaultValue());
         assertEquals(4, (int) type.getFractionDigits());
-        assertTrue(type.getLengths().isEmpty());
-        assertTrue(type.getPatterns().isEmpty());
-        assertTrue(type.getRanges().isEmpty());
+        assertTrue(type.getLengthConstraints().isEmpty());
+        assertTrue(type.getPatternConstraints().isEmpty());
+        assertTrue(type.getRangeConstraints().isEmpty());
 
         ExtendedType typeBase = (ExtendedType) type.getBaseType();
         QName typeBaseQName = typeBase.getQName();
@@ -444,9 +444,9 @@ public class YangParserTest {
         assertNull(typeBase.getUnits());
         assertNull(typeBase.getDefaultValue());
         assertNull(typeBase.getFractionDigits());
-        assertTrue(typeBase.getLengths().isEmpty());
-        assertTrue(typeBase.getPatterns().isEmpty());
-        assertTrue(typeBase.getRanges().isEmpty());
+        assertTrue(typeBase.getLengthConstraints().isEmpty());
+        assertTrue(typeBase.getPatternConstraints().isEmpty());
+        assertTrue(typeBase.getRangeConstraints().isEmpty());
 
         Decimal64 decimal = (Decimal64) typeBase.getBaseType();
         assertEquals(6, (int) decimal.getFractionDigits());
@@ -466,9 +466,9 @@ public class YangParserTest {
         assertNull(type.getUnits());
         assertNull(type.getDefaultValue());
         assertNull(type.getFractionDigits());
-        assertTrue(type.getLengths().isEmpty());
-        assertTrue(type.getPatterns().isEmpty());
-        assertTrue(type.getRanges().isEmpty());
+        assertTrue(type.getLengthConstraints().isEmpty());
+        assertTrue(type.getPatternConstraints().isEmpty());
+        assertTrue(type.getRangeConstraints().isEmpty());
 
         Decimal64 baseTypeDecimal = (Decimal64) type.getBaseType();
         assertEquals(6, (int) baseTypeDecimal.getFractionDigits());
@@ -488,9 +488,9 @@ public class YangParserTest {
         assertNull(type.getUnits());
         assertNull(type.getDefaultValue());
         assertNull(type.getFractionDigits());
-        assertTrue(type.getLengths().isEmpty());
-        assertTrue(type.getPatterns().isEmpty());
-        assertTrue(type.getRanges().isEmpty());
+        assertTrue(type.getLengthConstraints().isEmpty());
+        assertTrue(type.getPatternConstraints().isEmpty());
+        assertTrue(type.getRangeConstraints().isEmpty());
 
         ExtendedType baseType = (ExtendedType) type.getBaseType();
         QName baseTypeQName = baseType.getQName();
@@ -501,9 +501,9 @@ public class YangParserTest {
         assertNull(baseType.getUnits());
         assertNull(baseType.getDefaultValue());
         assertNull(baseType.getFractionDigits());
-        assertTrue(baseType.getLengths().isEmpty());
-        assertTrue(baseType.getPatterns().isEmpty());
-        assertTrue(baseType.getRanges().isEmpty());
+        assertTrue(baseType.getLengthConstraints().isEmpty());
+        assertTrue(baseType.getPatternConstraints().isEmpty());
+        assertTrue(baseType.getRangeConstraints().isEmpty());
 
         UnionType unionType = (UnionType) baseType.getBaseType();
         List<TypeDefinition<?>> unionTypes = unionType.getTypes();
@@ -518,9 +518,9 @@ public class YangParserTest {
         assertNull(unionType1.getUnits());
         assertNull(unionType1.getDefaultValue());
         assertNull(unionType1.getFractionDigits());
-        assertTrue(unionType1.getLengths().isEmpty());
-        assertTrue(unionType1.getPatterns().isEmpty());
-        List<RangeConstraint> ranges = unionType1.getRanges();
+        assertTrue(unionType1.getLengthConstraints().isEmpty());
+        assertTrue(unionType1.getPatternConstraints().isEmpty());
+        List<RangeConstraint> ranges = unionType1.getRangeConstraints();
         assertEquals(1, ranges.size());
         RangeConstraint range = ranges.get(0);
         assertEquals(1L, range.getMin());
@@ -544,9 +544,9 @@ public class YangParserTest {
         assertNull(type.getUnits());
         assertNull(type.getDefaultValue());
         assertNull(type.getFractionDigits());
-        assertTrue(type.getLengths().isEmpty());
-        assertTrue(type.getPatterns().isEmpty());
-        assertTrue(type.getRanges().isEmpty());
+        assertTrue(type.getLengthConstraints().isEmpty());
+        assertTrue(type.getPatternConstraints().isEmpty());
+        assertTrue(type.getRangeConstraints().isEmpty());
 
         ExtendedType typeBase = (ExtendedType) type.getBaseType();
         QName typeBaseQName = typeBase.getQName();
@@ -557,9 +557,9 @@ public class YangParserTest {
         assertNull(typeBase.getUnits());
         assertNull(typeBase.getDefaultValue());
         assertNull(typeBase.getFractionDigits());
-        assertTrue(typeBase.getLengths().isEmpty());
-        assertTrue(typeBase.getPatterns().isEmpty());
-        assertTrue(typeBase.getRanges().isEmpty());
+        assertTrue(typeBase.getLengthConstraints().isEmpty());
+        assertTrue(typeBase.getPatternConstraints().isEmpty());
+        assertTrue(typeBase.getRangeConstraints().isEmpty());
 
         UnionType union = (UnionType) typeBase.getBaseType();
         List<TypeDefinition<?>> unionTypes = union.getTypes();
@@ -576,9 +576,9 @@ public class YangParserTest {
         assertNull(unionType1.getUnits());
         assertNull(unionType1.getDefaultValue());
         assertNull(unionType1.getFractionDigits());
-        assertTrue(unionType1.getLengths().isEmpty());
-        assertTrue(unionType1.getPatterns().isEmpty());
-        assertTrue(unionType1.getRanges().isEmpty());
+        assertTrue(unionType1.getLengthConstraints().isEmpty());
+        assertTrue(unionType1.getPatternConstraints().isEmpty());
+        assertTrue(unionType1.getRangeConstraints().isEmpty());
 
         UnionType nestedUnion = (UnionType) unionType1.getBaseType();
         List<TypeDefinition<?>> nestedUnion2Types = nestedUnion.getTypes();
@@ -595,9 +595,9 @@ public class YangParserTest {
         assertNull(myUnionExt.getUnits());
         assertNull(myUnionExt.getDefaultValue());
         assertNull(myUnionExt.getFractionDigits());
-        assertTrue(myUnionExt.getLengths().isEmpty());
-        assertTrue(myUnionExt.getPatterns().isEmpty());
-        assertTrue(myUnionExt.getRanges().isEmpty());
+        assertTrue(myUnionExt.getLengthConstraints().isEmpty());
+        assertTrue(myUnionExt.getPatternConstraints().isEmpty());
+        assertTrue(myUnionExt.getRangeConstraints().isEmpty());
 
         ExtendedType myUnion = (ExtendedType) myUnionExt.getBaseType();
         QName myUnionQName = myUnion.getQName();
@@ -608,9 +608,9 @@ public class YangParserTest {
         assertNull(myUnion.getUnits());
         assertNull(myUnion.getDefaultValue());
         assertNull(myUnion.getFractionDigits());
-        assertTrue(myUnion.getLengths().isEmpty());
-        assertTrue(myUnion.getPatterns().isEmpty());
-        assertTrue(myUnion.getRanges().isEmpty());
+        assertTrue(myUnion.getLengthConstraints().isEmpty());
+        assertTrue(myUnion.getPatternConstraints().isEmpty());
+        assertTrue(myUnion.getRangeConstraints().isEmpty());
 
         UnionType myUnionBase = (UnionType) myUnion.getBaseType();
         List<TypeDefinition<?>> myUnionBaseTypes = myUnionBase.getTypes();
@@ -627,9 +627,9 @@ public class YangParserTest {
         assertNull(int16Ext.getUnits());
         assertNull(int16Ext.getDefaultValue());
         assertNull(int16Ext.getFractionDigits());
-        assertTrue(int16Ext.getLengths().isEmpty());
-        assertTrue(int16Ext.getPatterns().isEmpty());
-        List<RangeConstraint> ranges = int16Ext.getRanges();
+        assertTrue(int16Ext.getLengthConstraints().isEmpty());
+        assertTrue(int16Ext.getPatternConstraints().isEmpty());
+        List<RangeConstraint> ranges = int16Ext.getRangeConstraints();
         assertEquals(1, ranges.size());
         RangeConstraint range = ranges.get(0);
         assertEquals(1L, range.getMin());
index 338b400d0f5b38f7125576c99a4d8f4a00500f0d..59e3c8d5a26db4a48f37a26e4dd61c2c8e1e9871 100644 (file)
@@ -82,7 +82,7 @@ public class YangParserWithContextTest {
         assertEquals("port-number", qname.getLocalName());
 
         ExtendedType dscpExt = (ExtendedType) TestUtils.findTypedef(module.getTypeDefinitions(), "dscp-ext");
-        List<RangeConstraint> ranges = dscpExt.getRanges();
+        List<RangeConstraint> ranges = dscpExt.getRangeConstraints();
         assertEquals(1, ranges.size());
         RangeConstraint range = ranges.get(0);
         assertEquals(0L, range.getMin());