Bug 6859: Cleanup package names for mdsal-binding-generator-api module 03/46503/10
authorRashmi Pujar <rpujar@inocybe.com>
Fri, 7 Oct 2016 17:15:52 +0000 (13:15 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 1 Nov 2016 13:29:40 +0000 (13:29 +0000)
Most packages still contain yangtools in the package name in mdsal which seems to be
a by-product of cleaning up of the Java Binding code from YANG Tools to md-sal.

The APIs are copied to new package.
Added deprecated annotation to the old api.
Deleted pkg org.opendaylight.yangtools.sal.binding.model.api.type.provider

Change-Id: Ic120a7ec1f85d8f604aa575047d8bd639630517b
Signed-off-by: Rashmi Pujar <rpujar@inocybe.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
70 files changed:
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/api/BindingGenerator.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/api/ClassLoadingStrategy.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/api/ModuleInfoRegistry.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/api/package-info.java [moved from binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/type/provider/package-info.java with 81% similarity]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/BindingGeneratorServiceProvider.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/TypeProvider.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/TypeProviderFactory.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/package-info.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/AccessModifier.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/AnnotationType.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/BaseTypeWithRestrictions.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/CodeGenerator.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/ConcreteType.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Constant.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/DocumentedType.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Enumeration.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedProperty.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedTransferIdentityObject.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedTransferObject.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedType.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/MethodSignature.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/ParameterizedType.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Restrictions.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Type.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/TypeMember.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/WildcardType.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/package-info.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/AnnotationTypeBuilder.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/ConstantBuilder.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/EnumBuilder.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedPropertyBuilder.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedTOBuilder.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedTypeBuilder.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedTypeBuilderBase.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/MethodSignatureBuilder.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/TypeMemberBuilder.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/package-info.java [new file with mode: 0644]
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/generator/api/BindingGenerator.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/generator/api/ClassLoadingStrategy.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/generator/api/ModuleInfoRegistry.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/generator/spi/BindingGeneratorServiceProvider.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/generator/spi/TypeProvider.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/generator/spi/TypeProviderFactory.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/AccessModifier.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/AnnotationType.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/BaseTypeWithRestrictions.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/CodeGenerator.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/ConcreteType.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/Constant.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/DocumentedType.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/Enumeration.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/GeneratedProperty.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/GeneratedTransferIdentityObject.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/GeneratedTransferObject.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/GeneratedType.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/MethodSignature.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/ParameterizedType.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/Restrictions.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/Type.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/TypeMember.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/WildcardType.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/type/builder/AnnotationTypeBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/type/builder/ConstantBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/type/builder/EnumBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/type/builder/GeneratedPropertyBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/type/builder/GeneratedTOBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/type/builder/GeneratedTypeBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/type/builder/GeneratedTypeBuilderBase.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/type/builder/MethodSignatureBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/type/builder/TypeMemberBuilder.java

diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/api/BindingGenerator.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/api/BindingGenerator.java
new file mode 100644 (file)
index 0000000..7a4b7c2
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.generator.api;
+
+import java.util.List;
+import java.util.Set;
+
+import org.opendaylight.mdsal.binding.model.api.Type;
+import org.opendaylight.yangtools.yang.model.api.Module;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+
+/**
+ * Transform Schema Context to Generated types.
+ *
+ */
+public interface BindingGenerator {
+
+    /**
+     * Generate Types from whole Schema Context. <br>
+     * The method will return List of All Generated Types that could be
+     * Generated from Schema Context.
+     *
+     *
+     * @param context
+     *            Schema Context
+     * @return List of Generated Types
+     *
+     * @see SchemaContext
+     */
+    List<Type> generateTypes(final SchemaContext context);
+
+    /**
+     * Generate Types from Schema Context restricted by sub set of specified
+     * Modules. The Schema Context MUST contain all of the sub modules otherwise
+     * the there is no guarantee that result List of Generated Types will
+     * contain correct Generated Types.
+     *
+     * @param context
+     *            Schema Context
+     * @param modules
+     *            Sub Set of Modules
+     * @return List of Generated Types restricted by sub set of Modules
+     *
+     * @see Module
+     * @see SchemaContext
+     *
+     */
+    List<Type> generateTypes(final SchemaContext context, final Set<Module> modules);
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/api/ClassLoadingStrategy.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/api/ClassLoadingStrategy.java
new file mode 100644 (file)
index 0000000..926bbec
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.generator.api;
+
+import org.opendaylight.mdsal.binding.model.api.Type;
+
+public interface ClassLoadingStrategy {
+
+    Class<?> loadClass(Type type) throws ClassNotFoundException;
+
+    Class<?> loadClass(String fullyQualifiedName) throws ClassNotFoundException;
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/api/ModuleInfoRegistry.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/api/ModuleInfoRegistry.java
new file mode 100644 (file)
index 0000000..903c116
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.mdsal.binding.generator.api;
+
+import org.opendaylight.yangtools.concepts.ObjectRegistration;
+import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
+
+public interface ModuleInfoRegistry {
+
+    ObjectRegistration<YangModuleInfo> registerModuleInfo(YangModuleInfo yangModuleInfo);
+}
@@ -5,4 +5,4 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.yangtools.sal.binding.model.api.type.provider;
\ No newline at end of file
+package org.opendaylight.mdsal.binding.generator.api;
\ No newline at end of file
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/BindingGeneratorServiceProvider.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/BindingGeneratorServiceProvider.java
new file mode 100644 (file)
index 0000000..6548686
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.generator.spi;
+
+public interface BindingGeneratorServiceProvider {
+
+    void registerTypeProvider(final TypeProvider provider);
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/TypeProvider.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/TypeProvider.java
new file mode 100644 (file)
index 0000000..e30ba58
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.generator.spi;
+
+import org.opendaylight.mdsal.binding.model.api.Restrictions;
+import org.opendaylight.mdsal.binding.model.api.Type;
+import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.SchemaNode;
+import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
+
+public interface TypeProvider {
+
+    /**
+     * Resolve of yang Type Definition to it's java counter part.
+     * If the Type Definition contains one of yang primitive types the method
+     * will return java.lang. counterpart. (For example if yang type is int32
+     * the java counterpart is java.lang.Integer). In case that Type
+     * Definition contains extended type defined via yang typedef statement
+     * the method SHOULD return Generated Type or Generated Transfer Object
+     * if that Type is correctly referenced to resolved imported yang module.
+     * The method will return <code>null</code> value in situations that
+     * TypeDefinition can't be resolved (either due missing yang import or
+     * incorrectly specified type).
+     *
+     *
+     * @param type Type Definition to resolve from
+     * @return Resolved Type
+     */
+    Type javaTypeForSchemaDefinitionType(final TypeDefinition<?> type, final SchemaNode parentNode);
+
+    Type javaTypeForSchemaDefinitionType(final TypeDefinition<?> type, final SchemaNode parentNode, final Restrictions restrictions);
+
+    /**
+     * Returns string containing code for creation of new type instance.
+     *
+     * @param node
+     * @return
+     */
+    String getTypeDefaultConstruction(LeafSchemaNode node);
+
+    String getConstructorPropertyName(SchemaNode node);
+
+    String getParamNameFromType(TypeDefinition<?> type);
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/TypeProviderFactory.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/TypeProviderFactory.java
new file mode 100644 (file)
index 0000000..196b9df
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.generator.spi;
+
+import org.opendaylight.yangtools.yang.model.api.ModuleIdentifier;
+
+//FIXME not implemented anywhere
+public interface TypeProviderFactory {
+
+    TypeProvider providerFor(ModuleIdentifier module);
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/package-info.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/package-info.java
new file mode 100644 (file)
index 0000000..12fca7d
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.generator.spi;
\ No newline at end of file
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/AccessModifier.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/AccessModifier.java
new file mode 100644 (file)
index 0000000..7ee3078
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+/**
+ * Enum definition which provides four access modifiers that are described
+ * in Java programming language (Default, Private, Protected, Public).
+ */
+public enum AccessModifier {
+    DEFAULT,
+    PRIVATE,
+    PUBLIC,
+    PROTECTED
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/AnnotationType.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/AnnotationType.java
new file mode 100644 (file)
index 0000000..186ee67
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+import java.util.List;
+
+/**
+ * The Annotation Type interface is designed to hold information about
+ * annotation for any type that could be annotated in Java. <br>
+ * For sake of simplicity the Annotation Type is not designed to model exact
+ * behaviour of annotation mechanism, but just to hold information needed to
+ * model annotation over java Type definition.
+ */
+public interface AnnotationType extends Type {
+
+    /**
+     * Returns the List of Annotations. <br>
+     * Each Annotation Type MAY have defined multiple Annotations.
+     *
+     * @return the List of Annotations.
+     */
+    List<AnnotationType> getAnnotations();
+
+    /**
+     * Returns Parameter Definition assigned for given parameter name. <br>
+     * If Annotation does not contain parameter with specified param name, the
+     * method MAY return <code>null</code> value.
+     *
+     * @param paramName
+     *            Parameter Name
+     * @return Parameter Definition assigned for given parameter name.
+     */
+    Parameter getParameter(final String paramName);
+
+    /**
+     * Returns List of all parameters assigned to Annotation Type.
+     *
+     * @return List of all parameters assigned to Annotation Type.
+     */
+    List<Parameter> getParameters();
+
+    /**
+     * Returns List of parameter names.
+     *
+     * @return List of parameter names.
+     */
+    List<String> getParameterNames();
+
+    /**
+     * Returns <code>true</code> if annotation contains parameters.
+     *
+     * @return <code>true</code> if annotation contains parameters.
+     */
+    boolean containsParameters();
+
+    /**
+     * Annotation Type parameter interface. For simplicity the Parameter
+     * contains values and value types as Strings. Every annotation which
+     * contains parameters could contain either single parameter or array of
+     * parameters. To model this purposes the by contract if the parameter
+     * contains single parameter the {@link #getValues()} method will return
+     * empty List and {@link #getValue()} MUST always return non-
+     * <code>null</code> parameter. If the Parameter holds List of values the
+     * singular {@link #getValue()} parameter MAY return <code>null</code>
+     * value.
+     */
+    interface Parameter {
+
+        /**
+         * Returns the Name of the parameter.
+         *
+         * @return the Name of the parameter.
+         */
+        String getName();
+
+        /**
+         * Returns value in String format if Parameter contains singular value,
+         * otherwise MAY return <code>null</code>.
+         *
+         * @return value in String format if Parameter contains singular value.
+         */
+        String getValue();
+
+        /**
+         * Returns List of Parameter assigned values in order in which they were
+         * assigned for given parameter name. <br>
+         * If there are multiple values assigned for given parameter name the
+         * method MUST NOT return empty List.
+         *
+         * @return List of Parameter assigned values in order in which they were
+         *         assigned for given parameter name.
+         */
+        List<String> getValues();
+    }
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/BaseTypeWithRestrictions.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/BaseTypeWithRestrictions.java
new file mode 100644 (file)
index 0000000..f3fbff3
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+/**
+ * The BaseTypeWithRestrictions is marker interface that encapsulates definition of java
+ * concrete type only with changed restriction values.
+ */
+public interface BaseTypeWithRestrictions extends ConcreteType {
+
+}
\ No newline at end of file
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/CodeGenerator.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/CodeGenerator.java
new file mode 100644 (file)
index 0000000..7703616
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+import org.opendaylight.yangtools.sal.binding.model.api.Type;
+
+/**
+ * Transformas data to concrete code in a programming language.
+ */
+public interface CodeGenerator {
+
+    /**
+     * Generates code for <code>type</code>.
+     *
+     * @param type
+     *            Input type to be processed
+     * @return generated JAVA code
+     */
+    String generate(Type type);
+
+    /**
+     * Checks if the concrete instance of <code>type</code> fit to concrete
+     * implementation of this interface.
+     *
+     * (e. g. method return true if in <code>EnumGenerator</code> (which
+     * implements this interface) has input parameter of type Enumeration (which
+     * is subtype of Type)
+     *
+     * @param type
+     *            Input type to be processed
+     * @return true if type is acceptable for processing.
+     */
+    boolean isAcceptable(Type type);
+
+    /**
+     * Returns name of <code>type</code> parameter.
+     *
+     * @param type
+     *            Input type to be processed
+     * @return name of generated unit
+     */
+    String getUnitName(Type type);
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/ConcreteType.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/ConcreteType.java
new file mode 100644 (file)
index 0000000..d07f83d
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+/**
+ * The Concrete Type is marker interface that encapsulates definition of java
+ * concrete type.
+ */
+public interface ConcreteType extends Type {
+
+    Restrictions getRestrictions();
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Constant.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Constant.java
new file mode 100644 (file)
index 0000000..9f1cf76
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+/**
+ * Interface Contact is designed to hold and model java constant. In Java there
+ * are no constant keywords instead of the constant is defined as static final
+ * field with assigned value. For this purpose the Constant interface contains
+ * methods {@link #getType()} to provide wrapped return Type of Constant,
+ * {@link #getName()} the Name of constant and the {@link #getValue()} for
+ * providing of value assigned to Constant. To determine of which type the
+ * constant value is it is recommended firstly to retrieve Type from constant.
+ * The Type interface holds base information like java package name and java
+ * type name (e.g. fully qualified name). From this string user should be able
+ * to determine to which type can be {@link #getValue()} type typecasted to
+ * unbox and provide value assigned to constant.
+ */
+public interface Constant {
+
+    /**
+     * Returns the Type that declares constant.
+     *
+     * @return the Type that declares constant.
+     */
+    Type getDefiningType();
+
+    /**
+     * Returns the return Type (or just Type) of the Constant.
+     *
+     * @return the return Type (or just Type) of the Constant.
+     */
+    Type getType();
+
+    /**
+     * Returns the name of constant. <br>
+     * By conventions the name SHOULD be in CAPITALS separated with underscores.
+     *
+     * @return the name of constant.
+     */
+    String getName();
+
+    /**
+     * Returns boxed value that is assigned for context.
+     *
+     * @return boxed value that is assigned for context.
+     */
+    Object getValue();
+
+    /**
+     * Returns Constant definition in formatted string. <br>
+     * <br>
+     * The expected string SHOULD be in format: <code>public final
+     * static [Type] CONSTANT_NAME = [value];</code>
+     *
+     * @return Constant definition in formatted string.
+     */
+    String toFormattedString();
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/DocumentedType.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/DocumentedType.java
new file mode 100644 (file)
index 0000000..2640000
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+import org.opendaylight.yangtools.yang.common.QName;
+
+/**
+ * Implementing this interface allows an object to hold information which are
+ * essential for generating java doc from type definition.
+ */
+public interface DocumentedType {
+
+    /**
+     * Returns a string that contains a human-readable textual description of
+     * type definition.
+     *
+     * @return a human-readable textual description of type definition.
+     */
+    String getDescription();
+
+    /**
+     * Returns a string that is used to specify a textual cross-reference to an
+     * external document, either another module that defines related management
+     * information, or a document that provides additional information relevant
+     * to this definition.
+     *
+     * @return a textual cross-reference to an external document.
+     */
+    String getReference();
+
+    /**
+     * Returns a list of QNames which represent schema path in schema tree from
+     * actual concrete type to the root.
+     *
+     * @return a schema path in schema tree from actual concrete schema node
+     *         identifier to the root.
+     */
+    Iterable<QName> getSchemaPath();
+
+    /**
+     * Returns the name of the module, in which generated type was specified.
+     *
+     * @return the name of the module, in which generated type was specified.
+     */
+    String getModuleName();
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Enumeration.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Enumeration.java
new file mode 100644 (file)
index 0000000..c50092c
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+import java.util.List;
+
+import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
+
+/**
+ * Interface provide methods for reading data of enumeration class.
+ */
+public interface Enumeration extends GeneratedType {
+
+    /**
+     *
+     * Returns list of annotation definitions associated with enumeration type.
+     *
+     * @return list of annotation definitions associated with enumeration type.
+     *
+     */
+    @Override
+    List<AnnotationType> getAnnotations();
+
+    @Override
+    Type getParentType();
+
+    /**
+     * Returns list of the couples - name and value.
+     *
+     * @return list of the enumeration pairs.
+     */
+    List<Pair> getValues();
+
+    /**
+     * Formats enumeration according to rules of the programming language.
+     *
+     * @return string with source code in some programming language
+     */
+    String toFormattedString();
+
+    /**
+     * Interface is used for reading enumeration item. It means item's name and
+     * its value.
+     */
+    interface Pair extends DocumentedNode {
+
+        /**
+         * Returns the name of the enumeration item as it is specified in the input yang.
+         *
+         * @return the name of the enumeration item as it is specified in the input yang.
+         */
+        String getName();
+
+        /**
+         * Returns the binding representation for the name of the enumeration item.
+         *
+         * @return the binding representation for the name of the enumeration item.
+         */
+        String getMappedName();
+
+        /**
+         * Returns value of the enumeration item.
+         *
+         * @return the value of the enumeration item.
+         */
+        int getValue();
+    }
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedProperty.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedProperty.java
new file mode 100644 (file)
index 0000000..34b4732
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+/**
+ * Generated Property extends interface {@link MethodSignature} interface. <br>
+ * The Generated Property interface is designed to store information of fields
+ * (or members) declared in Java Transfer Objects (or any java classes) and
+ * their access counterparts (getters and setters).
+ *
+ * @see MethodSignature
+ */
+public interface GeneratedProperty extends TypeMember {
+
+    String getValue();
+
+    /**
+     * Returns <code>true</code> if the property si declared as read-only. <br>
+     * If the property has flag <code>isReadOnly == true</code> the property
+     * SHOULD be generated as getter only.
+     *
+     * @return <code>true</code> if the property si declared as read-only.
+     */
+    boolean isReadOnly();
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedTransferIdentityObject.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedTransferIdentityObject.java
new file mode 100644 (file)
index 0000000..780a420
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+public interface GeneratedTransferIdentityObject extends GeneratedTransferObject {
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedTransferObject.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedTransferObject.java
new file mode 100644 (file)
index 0000000..342d818
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+import java.util.List;
+import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
+
+/**
+ * Generated Transfer Object extends {@link GeneratedType} and is designed to
+ * represent Java Class. The Generated Transfer Object contains declarations of
+ * member fields stored in List of Properties. The Generated Transfer Object can
+ * be extended by exactly ONE Generated Transfer Object as Java don't allow
+ * multiple inheritance. For retrieval of implementing Generated Types use
+ * {@link #getImplements()} method. <br>
+ * Every transfer object SHOULD contain equals, hashCode and toString
+ * definitions. For this purpose retrieve definitions through
+ * {@link #getEqualsIdentifiers ()}, {@link #getHashCodeIdentifiers()} and
+ * {@link #getToStringIdentifiers ()}.
+ *
+ */
+public interface GeneratedTransferObject extends GeneratedType {
+
+    GeneratedProperty getSUID();
+
+    /**
+     * Returns the Generated Transfer Object from which this GTO is derived, or
+     * null if this GTO is not derived from a GTO -- e.g. it is either an union
+     * or it is derived from a concrete type.
+     *
+     * @return Generated Transfer Object or <code>null</code> if this GTO is
+     *         not derived from another GTO.
+     */
+    GeneratedTransferObject getSuperType();
+
+    /**
+     * Returns List of Properties that are designated to define equality for
+     * Generated Transfer Object.
+     *
+     * @return List of Properties that are designated to define equality for
+     *         Generated Transfer Object.
+     */
+    List<GeneratedProperty> getEqualsIdentifiers();
+
+    /**
+     * Returns List of Properties that are designated to define identity for
+     * Generated Transfer Object.
+     *
+     * @return List of Properties that are designated to define identity for
+     *         Generated Transfer Object.
+     */
+    List<GeneratedProperty> getHashCodeIdentifiers();
+
+    /**
+     * Returns List of Properties that will be members of toString definition
+     * for Generated Transfer Object.
+     *
+     * @return List of Properties that will be members of toString definition
+     *         for Generated Transfer Object.
+     */
+    List<GeneratedProperty> getToStringIdentifiers();
+
+    boolean isTypedef();
+
+    /**
+     * Returns Base type of Java representation of YANG typedef if set, otherwise it returns null
+     *
+     * @return Base type of Java representation of YANG typedef if set, otherwise it returns null
+     */
+    TypeDefinition<?> getBaseType();
+
+    /**
+     * Return boolean value which describe whether Generated Transfer Object
+     * was/wasn't created from union YANG type.
+     *
+     * @return true value if Generated Transfer Object was created from union
+     *         YANG type.
+     */
+    boolean isUnionType();
+
+    boolean isUnionTypeBuilder();
+
+    Restrictions getRestrictions();
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedType.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedType.java
new file mode 100644 (file)
index 0000000..aedbc37
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+import java.util.List;
+
+/**
+ * Every Java interface has to be specified with:
+ * <ul>
+ * <li><code>package</code> that belongs into</li>
+ * <li><code>interface</code> name (with commentary that <b>SHOULD</b> be
+ * present to proper define interface and base <i>contracts</i> specified for
+ * interface)</li>
+ * <li>Each Generated Type can define list of types that Generated Type can
+ * implement to extend it's definition (i.e. interface extends list of
+ * interfaces or java class implements list of interfaces)</li>
+ * <li>Each Generated Type can contain multiple enclosed definitions of
+ * Generated Types (i.e. interface can contain N enclosed interface definitions
+ * or enclosed classes)</li>
+ * <li><code>enum</code> and <code>constant</code> definitions (i.e. each
+ * constant definition is by default defined as <code>public static final</code>
+ * + type (either primitive or object) and constant name</li>
+ * <li><code>method definitions</code> with specified input parameters (with
+ * types) and return values</li>
+ * </ul>
+ *
+ * By the definition of the interface constant, enum, enclosed types and method
+ * definitions MUST be public, so there is no need to specify the scope of
+ * visibility.
+ */
+public interface GeneratedType extends Type, DocumentedType {
+
+    /**
+     * Returns the parent type if Generated Type is defined as enclosing type,
+     * otherwise returns <code>null</code>
+     *
+     * @return the parent type if Generated Type is defined as enclosing type,
+     *         otherwise returns <code>null</code>
+     */
+    Type getParentType();
+
+    /**
+     * Returns comment string associated with Generated Type.
+     *
+     * @return comment string associated with Generated Type.
+     */
+    String getComment();
+
+    /**
+     * Returns List of annotation definitions associated with generated type.
+     *
+     * @return List of annotation definitions associated with generated type.
+     */
+    List<AnnotationType> getAnnotations();
+
+    /**
+     * Returns <code>true</code> if The Generated Type is defined as abstract.
+     *
+     * @return <code>true</code> if The Generated Type is defined as abstract.
+     */
+    boolean isAbstract();
+
+    /**
+     * Returns List of Types that Generated Type will implement.
+     *
+     * @return List of Types that Generated Type will implement.
+     */
+    List<Type> getImplements();
+
+    /**
+     * Returns List of enclosing Generated Types.
+     *
+     * @return List of enclosing Generated Types.
+     */
+    List<GeneratedType> getEnclosedTypes();
+
+    /**
+     * Returns List of all Enumerator definitions associated with Generated
+     * Type.
+     *
+     * @return List of all Enumerator definitions associated with Generated
+     *         Type.
+     */
+    List<Enumeration> getEnumerations();
+
+    /**
+     * Returns List of Constant definitions associated with Generated Type.
+     *
+     * @return List of Constant definitions associated with Generated Type.
+     */
+    List<Constant> getConstantDefinitions();
+
+    /**
+     * Returns List of Method Definitions associated with Generated Type.
+     *
+     * List does not contains getters and setters for properties.
+     *
+     * @return List of Method Definitions associated with Generated Type.
+     */
+    List<MethodSignature> getMethodDefinitions();
+
+    /**
+     * Returns List of Properties that are declared for Generated Transfer
+     * Object.
+     *
+     * @return List of Properties that are declared for Generated Transfer
+     *         Object.
+     */
+    List<GeneratedProperty> getProperties();
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/MethodSignature.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/MethodSignature.java
new file mode 100644 (file)
index 0000000..c47452c
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+import java.util.List;
+
+/**
+ * The Method Signature interface contains simplified meta model for java method
+ * definition. Each method MUST be defined by name, return type, parameters and
+ * access modifier. <br>
+ * Additionally method MAY contain associated annotations and comment. By
+ * contract if method does not contain any comments or annotation definitions
+ * the {@link #getComment()} SHOULD rather return empty string and
+ * {@link #getAnnotations()} SHOULD rather return empty list than
+ * <code>null</code> values. <br>
+ * The defining Type contains the reference to Generated Type that declares
+ * Method Signature.
+ */
+public interface MethodSignature extends TypeMember {
+
+    /**
+     * Returns <code>true</code> if the method signature is defined as abstract. <br>
+     * By default in java all method declarations in interface are defined as
+     * abstract, but the user don't need necessary to declare abstract keyword
+     * in front of each method. <br>
+     * The abstract methods are allowed in Class definitions but only when the
+     * class is declared as abstract.
+     *
+     * @return <code>true</code> if the method signature is defined as abstract.
+     */
+    boolean isAbstract();
+
+    /**
+     * Returns the List of parameters that method declare. If the method does
+     * not contain any parameters, the method will return empty List.
+     *
+     * @return the List of parameters that method declare.
+     */
+    List<Parameter> getParameters();
+
+    /**
+     * The Parameter interface is designed to hold the information of method
+     * Parameter(s). The parameter is defined by his Name which MUST be unique
+     * as java does not allow multiple parameters with same names for one method
+     * and Type that is associated with parameter.
+     */
+    interface Parameter {
+
+        /**
+         * Returns the parameter name.
+         *
+         * @return the parameter name.
+         */
+        String getName();
+
+        /**
+         * Returns Type that is bounded to parameter name.
+         *
+         * @return Type that is bounded to parameter name.
+         */
+        Type getType();
+    }
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/ParameterizedType.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/ParameterizedType.java
new file mode 100644 (file)
index 0000000..4273525
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+/**
+ * Represents an instance of simple parametrized type such as List&lt;String&gt;.
+ *
+ * The parametrized Type is designed to be used to store information of Java
+ * Generic Type. The array of {@link #getActualTypeArguments()} holds
+ * information of all generic parameters defined for Parameterized Type.
+ */
+public interface ParameterizedType extends Type {
+
+    /**
+     * Returns array of Types that are defined for Parameterized Type.
+     * <br>
+     * (for example if ParameterizedType encapsulates java generic Map that
+     * specifies two parameters Map&lt;K,V&gt; and the K is java.lang.Integer and V
+     * is defined as GeneratedType the array will contain two Types to store
+     * the information of generic parameters.)
+     *
+     * @return array of Types that are defined for Parameterized Type.
+     */
+    Type[] getActualTypeArguments();
+
+    /**
+     * Returns the Raw Type definition of Parameterized Type.
+     *
+     * @return the Raw Type definition of Parameterized Type.
+     */
+    Type getRawType();
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Restrictions.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Restrictions.java
new file mode 100644 (file)
index 0000000..aece6ab
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+import java.util.List;
+
+import org.opendaylight.yangtools.yang.model.api.type.LengthConstraint;
+import org.opendaylight.yangtools.yang.model.api.type.PatternConstraint;
+import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
+
+public interface Restrictions {
+
+    List<LengthConstraint> getLengthConstraints();
+
+    List<PatternConstraint> getPatternConstraints();
+
+    List<RangeConstraint> getRangeConstraints();
+
+    boolean isEmpty();
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Type.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Type.java
new file mode 100644 (file)
index 0000000..c9db863
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+/**
+ * The Type interface defines the base type for all types defined in java. Each
+ * Type defined in java MUST contain name and package name, except of primitive
+ * types like int, byte etc. In case of mapping of primitive type the package
+ * name MUST be left as empty string.
+ *
+ */
+public interface Type {
+    /**
+     * Returns name of the package that interface belongs to.
+     *
+     * @return name of the package that interface belongs to
+     */
+    String getPackageName();
+
+    /**
+     * Returns name of the interface.
+     *
+     * @return name of the interface.
+     */
+    String getName();
+
+    /**
+     * Returns fully qualified name of Type. <br>
+     * The fully qualified name of Type MUST be returned in following format:
+     * <ul>
+     * <li>If does not contains package name: [type name] (e.g. int, byte,
+     * byte[],...)</li>
+     * <li>If Type contains package name: [package name].[type name] (e.g
+     * java.lang.Byte, org.opendaylight.controller.gen.GenType)</li>
+     * </ul>
+     *
+     * @return fully qualified name of Type.
+     */
+    String getFullyQualifiedName();
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/TypeMember.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/TypeMember.java
new file mode 100644 (file)
index 0000000..353c66e
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+import java.util.List;
+
+/**
+ * Common interface for variables and methods in class.
+ */
+public interface TypeMember {
+
+    /**
+     * Returns comment string associated with member.
+     *
+     * @return comment string associated with member.
+     */
+    String getComment();
+
+    /**
+     * Returns List of annotation definitions associated with generated type.
+     *
+     * @return List of annotation definitions associated with generated type.
+     */
+    List<AnnotationType> getAnnotations();
+
+    /**
+     * Returns the access modifier of member.
+     *
+     * @return the access modifier of member.
+     */
+    AccessModifier getAccessModifier();
+
+    /**
+     * Returns <code>true</code> if member is declared as static.
+     *
+     * @return <code>true</code> if member is declared as static.
+     */
+    boolean isStatic();
+
+    /**
+     * Returns <code>true</code> if member is declared as final.
+     *
+     * @return <code>true</code> if member is declared as final.
+     */
+    boolean isFinal();
+
+    /**
+     * Get the returning Type of member.
+     *
+     * @return the returning Type of member.
+     */
+    Type getReturnType();
+
+    /**
+     * Returns the name of member.
+     *
+     * @return the name of member.
+     */
+    String getName();
+
+    /**
+     * Returns the Type that declares member.
+     *
+     * @return the Type that declares member.
+     */
+    Type getDefiningType();
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/WildcardType.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/WildcardType.java
new file mode 100644 (file)
index 0000000..d9396fe
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
+
+/**
+ *
+ * Marker interface which assign to object property that it is bounded wildcard
+ * type.
+ *
+ */
+public interface WildcardType extends Type {
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/package-info.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/package-info.java
new file mode 100644 (file)
index 0000000..9af600c
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api;
\ No newline at end of file
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/AnnotationTypeBuilder.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/AnnotationTypeBuilder.java
new file mode 100644 (file)
index 0000000..35b6ad9
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api.type.builder;
+
+import java.util.List;
+
+import org.opendaylight.mdsal.binding.model.api.AnnotationType;
+import org.opendaylight.mdsal.binding.model.api.Type;
+
+/**
+ * Annotation Type Builder Interface serves for creation and instantiation of
+ * immutable copy of Annotation Type. The Annotation Type Builder extends from
+ * {@link Type} interface. The Annotation Type contains set of methods which are
+ * capable to provide information about other Annotation Types and Annotation
+ * Parameters.
+ *
+ * @see AnnotationType
+ */
+public interface AnnotationTypeBuilder extends Type {
+
+    /**
+     * The method creates new AnnotationTypeBuilder containing specified package
+     * name an annotation name. <br>
+     * Neither the package name or annotation name can contain <code>null</code>
+     * references. In case that any of parameters contains <code>null</code> the
+     * method SHOULD thrown {@link IllegalArgumentException}
+     *
+     * @param packageName
+     *            Package Name of Annotation Type
+     * @param name
+     *            Name of Annotation Type
+     * @return <code>new</code> instance of Annotation Type Builder.
+     */
+    AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
+
+    /**
+     * Adds the parameter into List of parameters for Annotation Type. <br>
+     * If there is already stored parameter with the same name as the new
+     * parameter, the value of the old one will be simply overwritten by the
+     * newer parameter. <br>
+     * Neither the param name or value can contain <code>null</code> references.
+     * In case that any of parameters contains <code>null</code> the method
+     * SHOULD thrown {@link IllegalArgumentException}
+     *
+     * @param paramName
+     *            Parameter Name
+     * @param value
+     *            Parameter Value
+     * @return <code>true</code> if the parameter has been successfully assigned
+     *         for Annotation Type
+     */
+    boolean addParameter(final String paramName, String value);
+
+    /**
+     * Adds the parameter with specified List of parameter values into List of
+     * parameters for Annotation Type. <br>
+     * If there is already stored parameter with the same name as the new
+     * parameter, the value of the old one will be simply overwritten by the
+     * newer parameter. <br>
+     * Neither the param name or value can contain <code>null</code> references.
+     * In case that any of parameters contains <code>null</code> the method
+     * SHOULD thrown {@link IllegalArgumentException}
+     *
+     * @param paramName
+     *            Parameter Name
+     * @param values
+     *            List of Values bounded to Parameter Name
+     * @return <code>true</code> if the parameter has been successfully assigned
+     *         for Annotation Type
+     */
+    boolean addParameters(final String paramName, List<String> values);
+
+    /**
+     * Returns <code>new</code> <i>immutable</i> instance of Annotation Type
+     * with values assigned in current instance of Annotation Type Builder. <br>
+     * The return Annotation Type instance is immutable thus no additional
+     * modification to Annotation Type Builder will have an impact to
+     * instantiated Annotation Type. <br>
+     * For this purpose call this method after all additions are complete.
+     *
+     * @return <code>new</code> <i>immutable</i> instance of Annotation Type.
+     */
+    AnnotationType toInstance();
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/ConstantBuilder.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/ConstantBuilder.java
new file mode 100644 (file)
index 0000000..52af445
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.Constant;
+import org.opendaylight.mdsal.binding.model.api.Type;
+
+public interface ConstantBuilder {
+
+    void assignValue(Object value);
+
+    Constant toInstance(Type definingType);
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/EnumBuilder.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/EnumBuilder.java
new file mode 100644 (file)
index 0000000..225f61a
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.Enumeration;
+import org.opendaylight.mdsal.binding.model.api.Type;
+import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition;
+
+/**
+ * Enum Builder is interface that contains methods to build and instantiate
+ * Enumeration definition.
+ *
+ * @see Enumeration
+ */
+public interface EnumBuilder extends Type {
+
+    /**
+     * The method creates new AnnotationTypeBuilder containing specified package
+     * name an annotation name. <br>
+     * Neither the package name or annotation name can contain <code>null</code>
+     * references. In case that any of parameters contains <code>null</code> the
+     * method SHOULD thrown {@link IllegalArgumentException}
+     *
+     * @param packageName
+     *            Package Name of Annotation Type
+     * @param name
+     *            Name of Annotation Type
+     * @return <code>new</code> instance of Annotation Type Builder.
+     */
+    AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
+
+    /**
+     *
+     * @param name
+     * @param value
+     */
+    void addValue(final String name, final int value, final String description);
+
+    /**
+     *
+     * @param definingType
+     * @return
+     */
+    Enumeration toInstance(final Type definingType);
+
+    /**
+     * Updates this builder with data from <code>enumTypeDef</code>.
+     * Specifically this data represents list of value-name pairs.
+     *
+     * @param enumTypeDef
+     *            enum type definition as source of enum data for
+     *            <code>enumBuilder</code>
+     */
+    void updateEnumPairsFromEnumTypeDef(final EnumTypeDefinition enumTypeDef);
+
+    /**
+     * @param description
+     */
+    void setDescription(final String description);
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedPropertyBuilder.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedPropertyBuilder.java
new file mode 100644 (file)
index 0000000..6109926
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.GeneratedProperty;
+import org.opendaylight.mdsal.binding.model.api.Type;
+
+/**
+ * Generated Property Builder is interface that contains methods to build and
+ * instantiate Generated Property definition.
+ *
+ * @see GeneratedProperty
+ */
+public interface GeneratedPropertyBuilder extends TypeMemberBuilder<GeneratedPropertyBuilder> {
+
+    GeneratedPropertyBuilder setValue(String value);
+
+    /**
+     * Sets isReadOnly flag for property. If property is marked as read only it
+     * is the same as set property in java as final.
+     *
+     * @param isReadOnly
+     *            Read Only property flag.
+     */
+    GeneratedPropertyBuilder setReadOnly(final boolean isReadOnly);
+
+    /**
+     * Returns <code>new</code> <i>immutable</i> instance of Generated Property. <br>
+     * The <code>definingType</code> param cannot be <code>null</code>. The
+     * every member in Java MUST be declared and defined inside the scope of
+     * <code>class</code> definition. In case that defining Type will be passed
+     * as <code>null</code> reference the method SHOULD thrown
+     * {@link IllegalArgumentException}.
+     *
+     * @param definingType
+     *            Defining Type of Generated Property
+     * @return <code>new</code> <i>immutable</i> instance of Generated Property.
+     */
+    GeneratedProperty toInstance(final Type definingType);
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedTOBuilder.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedTOBuilder.java
new file mode 100644 (file)
index 0000000..4c24401
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.GeneratedTransferObject;
+import org.opendaylight.mdsal.binding.model.api.Restrictions;
+import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
+
+/**
+ * Generated Transfer Object Builder is interface that contains methods to build
+ * and instantiate Generated Transfer Object definition.
+ *
+ * @see GeneratedTransferObject
+ */
+public interface GeneratedTOBuilder extends GeneratedTypeBuilderBase<GeneratedTOBuilder> {
+
+    /**
+     * Add Generated Transfer Object from which will be extended current
+     * Generated Transfer Object. <br>
+     * By definition Java does not allow multiple inheritance, hence if there is
+     * already definition of Generated Transfer Object the extending object will
+     * be overwritten by lastly added Generated Transfer Object. <br>
+     * If Generated Transfer Object is <code>null</code> the method SHOULD throw
+     * {@link IllegalArgumentException}
+     *
+     * @param genTransObj
+     *            Generated Transfer Object
+     * @return This instance of builder
+     */
+    GeneratedTOBuilder setExtendsType(final GeneratedTransferObject genTransObj);
+
+    /**
+     * Add Property that will be part of <code>equals</code> definition. <br>
+     * If Generated Property Builder is <code>null</code> the method SHOULD
+     * throw {@link IllegalArgumentException}
+     *
+     * @param property
+     *            Generated Property Builder
+     * @return This instance of builder
+     */
+    GeneratedTOBuilder addEqualsIdentity(final GeneratedPropertyBuilder property);
+
+    /**
+     * Add Property that will be part of <code>hashCode</code> definition. <br>
+     * If Generated Property Builder is <code>null</code> the method SHOULD
+     * throw {@link IllegalArgumentException}
+     *
+     * @param property
+     *            Generated Property Builder
+     * @return This instance of builder
+     */
+    GeneratedTOBuilder addHashIdentity(final GeneratedPropertyBuilder property);
+
+    /**
+     * Add Property that will be part of <code>toString</code> definition. <br>
+     * If Generated Property Builder is <code>null</code> the method SHOULD
+     * throw {@link IllegalArgumentException}
+     *
+     * @param property
+     *            Generated Property Builder
+     * @return This instance of builder
+     */
+    GeneratedTOBuilder addToStringProperty(final GeneratedPropertyBuilder property);
+
+    void setRestrictions(Restrictions restrictions);
+
+    /**
+     * Returns instance of <code>GeneratedTransferObject</code> which data are
+     * build from the data of this builder
+     *
+     * @return generated transfer object instance
+     */
+    GeneratedTransferObject toInstance();
+
+    void setTypedef(boolean isTypedef);
+
+    /**
+     * Sets the base type for Java representation of YANG typedef
+     *
+     * @param typeDef
+     *           Type Definition
+     */
+    void setBaseType(TypeDefinition<?> typeDef);
+
+    /**
+     *
+     * @param isUnion
+     */
+    void setIsUnion(boolean isUnion);
+
+    void setIsUnionBuilder(boolean isUnionTypeBuilder);
+
+    void setSUID(GeneratedPropertyBuilder suid);
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedTypeBuilder.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedTypeBuilder.java
new file mode 100644 (file)
index 0000000..0a77843
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.GeneratedType;
+
+/**
+ * Generated Type Builder interface is helper interface for building and
+ * defining the GeneratedType.
+ *
+ * @see GeneratedType
+ */
+public interface GeneratedTypeBuilder extends GeneratedTypeBuilderBase<GeneratedTypeBuilder> {
+
+    /**
+     * Returns the <code>new</code> <i>immutable</i> instance of Generated Type.
+     *
+     * @return the <code>new</code> <i>immutable</i> instance of Generated Type.
+     */
+    GeneratedType toInstance();
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedTypeBuilderBase.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedTypeBuilderBase.java
new file mode 100644 (file)
index 0000000..2ab39eb
--- /dev/null
@@ -0,0 +1,222 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api.type.builder;
+
+import java.util.List;
+
+import org.opendaylight.mdsal.binding.model.api.Constant;
+import org.opendaylight.mdsal.binding.model.api.Type;
+import org.opendaylight.yangtools.yang.common.QName;
+
+public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>> extends Type {
+
+    /**
+     * Adds new Enclosing Transfer Object into definition of Generated Type and
+     * returns <code>new</code> Instance of Generated TO Builder. <br>
+     * There is no need of specifying of Package Name because enclosing Type is
+     * already defined inside Generated Type with specific package name. <br>
+     * The name of enclosing Type cannot be same as Name of parent type and if
+     * there is already defined enclosing type with the same name, the new
+     * enclosing type will simply overwrite the older definition. <br>
+     * If the name of enclosing type is <code>null</code> the method SHOULD
+     * throw {@link IllegalArgumentException}
+     *
+     * @param name
+     *            Name of Enclosing Type
+     * @return <code>new</code> Instance of Generated Type Builder.
+     */
+    GeneratedTOBuilder addEnclosingTransferObject(String name);
+
+    /**
+     * Adds new Enclosing Transfer Object <code>genTOBuilder</code> into
+     * definition of Generated Type
+     *
+     * <br>
+     * There is no need of specifying of Package Name because enclosing Type is
+     * already defined inside Generated Type with specific package name. <br>
+     * The name of enclosing Type cannot be same as Name of parent type and if
+     * there is already defined enclosing type with the same name, the new
+     * enclosing type will simply overwrite the older definition. <br>
+     * If the parameter <code>genTOBuilder</code> of enclosing type is
+     * <code>null</code> the method SHOULD throw
+     * {@link IllegalArgumentException}
+     *
+     * @param genTOBuilder
+     *            Name of Enclosing Type
+     */
+    T addEnclosingTransferObject(GeneratedTOBuilder genTOBuilder);
+
+    /**
+     * Adds String definition of comment into Method Signature definition. <br>
+     * The comment String MUST NOT contain anny comment specific chars (i.e.
+     * "/**" or "//") just plain String text description.
+     *
+     * @param comment
+     *            Comment String.
+     */
+    T addComment(String comment);
+
+    /**
+     * The method creates new AnnotationTypeBuilder containing specified package
+     * name an annotation name. <br>
+     * Neither the package name or annotation name can contain <code>null</code>
+     * references. In case that any of parameters contains <code>null</code> the
+     * method SHOULD thrown {@link IllegalArgumentException}
+     *
+     * @param packageName
+     *            Package Name of Annotation Type
+     * @param name
+     *            Name of Annotation Type
+     * @return <code>new</code> instance of Annotation Type Builder.
+     */
+    AnnotationTypeBuilder addAnnotation(String packageName, String name);
+
+    boolean isAbstract();
+
+    /**
+     * Sets the <code>abstract</code> flag to define Generated Type as
+     * <i>abstract</i> type.
+     *
+     * @param isAbstract
+     *            abstract flag
+     */
+    T setAbstract(boolean isAbstract);
+
+    List<Type> getImplementsTypes();
+
+    /**
+     * Add Type to implements.
+     *
+     * @param genType
+     *            Type to implement
+     * @return <code>true</code> if the addition of type is successful.
+     */
+    T addImplementsType(Type genType);
+
+    /**
+     * Adds Constant definition and returns <code>new</code> Constant instance. <br>
+     * By definition Constant MUST be defined by return Type, Name and assigned
+     * value. The name SHOULD be defined with capital letters. Neither of method
+     * parameters can be <code>null</code> and the method SHOULD throw
+     * {@link IllegalArgumentException} if the contract is broken.
+     *
+     * @param type
+     *            Constant Type
+     * @param name
+     *            Name of Constant
+     * @param value
+     *            Assigned Value
+     * @return <code>new</code> Constant instance.
+     */
+    Constant addConstant(Type type, String name, Object value);
+
+    /**
+     * Adds new Enumeration definition for Generated Type Builder and returns
+     * Enum Builder for specifying all Enum parameters. <br>
+     * If there is already Enumeration stored with the same name, the old enum
+     * will be simply overwritten byt new enum definition. <br>
+     * Name of Enumeration cannot be <code>null</code>, if it is
+     * <code>null</code> the method SHOULD throw
+     * {@link IllegalArgumentException}
+     *
+     * @param name
+     *            Enumeration Name
+     * @return <code>new</code> instance of Enumeration Builder.
+     */
+    EnumBuilder addEnumeration(String name);
+
+    List<MethodSignatureBuilder> getMethodDefinitions();
+
+    /**
+     * Add new Method Signature definition for Generated Type Builder and
+     * returns Method Signature Builder for specifying all Method parameters. <br>
+     * Name of Method cannot be <code>null</code>, if it is <code>null</code>
+     * the method SHOULD throw {@link IllegalArgumentException} <br>
+     * By <i>Default</i> the MethodSignatureBuilder SHOULD be pre-set as
+     * {@link MethodSignatureBuilder#setAbstract(boolean)},
+     * {TypeMemberBuilder#setFinal(boolean)} and
+     * {TypeMemberBuilder#setAccessModifier(boolean)}
+     *
+     * @param name
+     *            Name of Method
+     * @return <code>new</code> instance of Method Signature Builder.
+     */
+    MethodSignatureBuilder addMethod(String name);
+
+    /**
+     * Checks if GeneratedTypeBuilder contains method with name
+     * <code>methodName</code>
+     *
+     * @param methodName
+     *            is method name
+     */
+    boolean containsMethod(String methodName);
+
+    List<GeneratedPropertyBuilder> getProperties();
+
+    /**
+     * Add new Generated Property definition for Generated Transfer Object
+     * Builder and returns Generated Property Builder for specifying Property. <br>
+     * Name of Property cannot be <code>null</code>, if it is <code>null</code>
+     * the method SHOULD throw {@link IllegalArgumentException}
+     *
+     * @param name
+     *            Name of Property
+     * @return <code>new</code> instance of Generated Property Builder.
+     */
+    GeneratedPropertyBuilder addProperty(String name);
+
+    /**
+     * Check whether GeneratedTOBuilder contains property with name
+     * <code>name</code>
+     *
+     * @param name
+     *            of property which existance is checked
+     * @return true if property <code>name</code> exists in list of properties.
+     */
+    boolean containsProperty(String name);
+
+    /**
+     * Set a string that contains a human-readable textual description of type
+     * definition.
+     *
+     * @param description
+     *            a string that contains a human-readable textual description of
+     *            type definition.
+     */
+    void setDescription(String description);
+
+    /**
+     * Set the name of the module, in which generated type was specified.
+     *
+     * @param moduleName
+     *            the name of the module
+     */
+    void setModuleName(String moduleName);
+
+    /**
+     * Set a list of QNames which represent schema path in schema tree from
+     * actual concrete type to the root.
+     *
+     * @param schemaPath
+     *            a list of QNames which represent schema path in schema tree
+     */
+    void setSchemaPath(Iterable<QName> schemaPath);
+
+    /**
+     * Set a string that is used to specify a textual cross-reference to an
+     * external document, either another module that defines related management
+     * information, or a document that provides additional information relevant
+     * to this definition.
+     *
+     * @param reference
+     *            a textual cross-reference to an external document.
+     */
+    void setReference(String reference);
+
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/MethodSignatureBuilder.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/MethodSignatureBuilder.java
new file mode 100644 (file)
index 0000000..e683ebd
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.MethodSignature;
+import org.opendaylight.mdsal.binding.model.api.Type;
+
+/**
+ * Method Signature Builder serves solely for building Method Signature and
+ * returning the <code>new</code> instance of Method Signature. <br>
+ * By definition of {@link MethodSignature} the Method in java MUST contain
+ * Name, Return Type and Access Modifier. By default the Access Modifier can be
+ * set to public. The Method Signature builder does not contain method for
+ * addName due to enforce reason that MethodSignatureBuilder SHOULD be
+ * instantiated only once with defined method name. <br>
+ * The methods as {@link #addAnnotation(String, String)} and
+ * {@link #setComment(String)} can be used as optional because not all methods
+ * MUST contain annotation or comment definitions.
+ *
+ *
+ * @see MethodSignature
+ */
+public interface MethodSignatureBuilder extends TypeMemberBuilder<MethodSignatureBuilder> {
+
+    /**
+     * Sets the flag for declaration of method as abstract or non abstract. If
+     * the flag <code>isAbstract == true</code> The instantiated Method
+     * Signature MUST have return value for {@link MethodSignature#isAbstract()}
+     * also equals to <code>true</code>.
+     *
+     * @param isAbstract
+     *            is abstract flag
+     */
+    MethodSignatureBuilder setAbstract(boolean isAbstract);
+
+    /**
+     * Adds Parameter into the List of method parameters. Neither the Name or
+     * Type of parameter can be <code>null</code>.
+     *
+     * <br>
+     * In case that any of parameters are defined as <code>null</code> the
+     * method SHOULD throw an {@link IllegalArgumentException}
+     *
+     * @param type
+     *            Parameter Type
+     * @param name
+     *            Parameter Name
+     */
+    MethodSignatureBuilder addParameter(final Type type, final String name);
+
+    /**
+     * Returns <code>new</code> <i>immutable</i> instance of Method Signature. <br>
+     * The <code>definingType</code> param cannot be <code>null</code>. The
+     * every method in Java MUST be declared and defined inside the scope of
+     * <code>class</code> or <code>interface</code> definition. In case that
+     * defining Type will be passed as <code>null</code> reference the method
+     * SHOULD thrown {@link IllegalArgumentException}.
+     *
+     * @param definingType
+     *            Defining Type of Method Signature
+     * @return <code>new</code> <i>immutable</i> instance of Method Signature.
+     */
+    MethodSignature toInstance(final Type definingType);
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/TypeMemberBuilder.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/TypeMemberBuilder.java
new file mode 100644 (file)
index 0000000..c1f2183
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.AccessModifier;
+import org.opendaylight.mdsal.binding.model.api.Type;
+
+public interface TypeMemberBuilder<T extends TypeMemberBuilder<T>> {
+
+    /**
+     * The method creates new AnnotationTypeBuilder containing specified package
+     * name an annotation name. <br>
+     * Neither the package name or annotation name can contain <code>null</code>
+     * references. In case that any of parameters contains <code>null</code> the
+     * method SHOULD thrown {@link IllegalArgumentException}
+     *
+     * @param packageName
+     *            Package Name of Annotation Type
+     * @param name
+     *            Name of Annotation Type
+     * @return <code>new</code> instance of Annotation Type Builder.
+     */
+    AnnotationTypeBuilder addAnnotation(String packageName, String name);
+
+    /**
+     * Returns the name of property.
+     *
+     * @return the name of property.
+     */
+    String getName();
+
+    /**
+     * Adds return Type into Builder definition for Generated Property. <br>
+     * The return Type MUST NOT be <code>null</code>, otherwise the method
+     * SHOULD throw {@link IllegalArgumentException}
+     *
+     * @param returnType
+     *            Return Type of property.
+     */
+    T setReturnType(Type returnType);
+
+    AccessModifier getAccessModifier();
+
+    /**
+     * Sets the access modifier of property.
+     *
+     * @param modifier
+     *            Access Modifier value.
+     */
+    T setAccessModifier(AccessModifier modifier);
+
+    /**
+     * Adds String definition of comment into Method Signature definition. <br>
+     * The comment String MUST NOT contain anny comment specific chars (i.e.
+     * "/**" or "//") just plain String text description.
+     *
+     * @param comment
+     *            Comment String.
+     */
+    T setComment(String comment);
+
+    /**
+     * Sets the flag final for method signature. If this is set the method will
+     * be prohibited from overriding. <br>
+     * This setting is irrelevant for methods designated to be defined in
+     * interface definitions because interface can't have final method.
+     *
+     * @param isFinal
+     *            Is Final
+     */
+    T setFinal(boolean isFinal);
+
+    T setStatic(boolean isStatic);
+}
diff --git a/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/package-info.java b/binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/package-info.java
new file mode 100644 (file)
index 0000000..2e47579
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.model.api.type.builder;
\ No newline at end of file
index 61900083a78a15f99f864fb5c9cdd44f732ea9aa..3995b947cd5b7cb262857035e7d800f7e5d15870 100644 (file)
@@ -16,20 +16,21 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 /**
  * Transform Schema Context to Generated types.
- * 
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.api.BindingGenerator} instead.
  */
+@Deprecated
 public interface BindingGenerator {
 
     /**
      * Generate Types from whole Schema Context. <br>
      * The method will return List of All Generated Types that could be
      * Generated from Schema Context.
-     * 
-     * 
+     *
+     *
      * @param context
      *            Schema Context
      * @return List of Generated Types
-     * 
+     *
      * @see SchemaContext
      */
     List<Type> generateTypes(final SchemaContext context);
@@ -39,16 +40,16 @@ public interface BindingGenerator {
      * Modules. The Schema Context MUST contain all of the sub modules otherwise
      * the there is no guarantee that result List of Generated Types will
      * contain correct Generated Types.
-     * 
+     *
      * @param context
      *            Schema Context
      * @param modules
      *            Sub Set of Modules
      * @return List of Generated Types restricted by sub set of Modules
-     * 
+     *
      * @see Module
      * @see SchemaContext
-     * 
+     *
      */
     List<Type> generateTypes(final SchemaContext context, final Set<Module> modules);
 }
index 2d9e32d5b59eeca7cbc16be88e0a8dce4decd5c8..01285130a2457d4f976affc7ab42dbeb9a2d5311 100644 (file)
@@ -9,10 +9,13 @@ package org.opendaylight.yangtools.sal.binding.generator.api;
 
 import org.opendaylight.yangtools.sal.binding.model.api.Type;
 
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.api.ClassLoadingStrategy} instead.
+ */
+@Deprecated
 public interface ClassLoadingStrategy {
 
     Class<?> loadClass(Type type) throws ClassNotFoundException;
 
     Class<?> loadClass(String fullyQualifiedName) throws ClassNotFoundException;
-
 }
index 9888b1dc755fbb1eeea1fd98179bad53e335c5b4..8a1f9cb6fda89cdf230856632f572d007bf22e8a 100644 (file)
@@ -8,10 +8,10 @@
 
 package org.opendaylight.yangtools.sal.binding.generator.api;
 
-import org.opendaylight.yangtools.concepts.ObjectRegistration;
-import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
-
-public interface ModuleInfoRegistry {
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.api.ModuleInfoRegistry} instead.
+ */
+@Deprecated
+public interface ModuleInfoRegistry extends org.opendaylight.mdsal.binding.generator.api.ModuleInfoRegistry {
 
-    ObjectRegistration<YangModuleInfo> registerModuleInfo(YangModuleInfo yangModuleInfo);
 }
index d306069116179748a8c0aee6c107972ab89e76ae..73e6ecd2a4d79ce157eb4f023ae4feefbfaad0b0 100644 (file)
@@ -7,6 +7,10 @@
  */
 package org.opendaylight.yangtools.sal.binding.generator.spi;
 
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.spi.BindingGeneratorServiceProvider} instead.
+ */
+@Deprecated
 public interface BindingGeneratorServiceProvider {
 
     void registerTypeProvider(final TypeProvider provider);
index 89d7a8cc76bb7919d772b2f9895384b94221ee67..87c4640ffaf5741029c9f8eb59d55d827e4f616e 100644 (file)
@@ -13,6 +13,10 @@ import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
 
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.spi.TypeProvider} instead.
+ */
+@Deprecated
 public interface TypeProvider {
 
     @Deprecated
@@ -49,5 +53,4 @@ public interface TypeProvider {
     String getConstructorPropertyName(SchemaNode node);
 
     String getParamNameFromType(TypeDefinition<?> type);
-
 }
index d0aa79bc9bc497574840b78598d004cdb57b9614..55b41067f9d221318aad82530d0a762a9c7755e9 100644 (file)
@@ -9,6 +9,10 @@ package org.opendaylight.yangtools.sal.binding.generator.spi;
 
 import org.opendaylight.yangtools.yang.model.api.ModuleIdentifier;
 
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.spi.TypeProviderFactory} instead.
+ */
+@Deprecated
 //FIXME not implemented anywhere
 public interface TypeProviderFactory {
 
index 13f13ee9dd11934258e9dadc04c9bb28170371d7..ddc819032f5d53376d61d37e26b4974eb0c0318d 100644 (file)
@@ -10,7 +10,10 @@ package org.opendaylight.yangtools.sal.binding.model.api;
 /**
  * Enum definition which provides four access modifiers that are described
  * in Java programming language (Default, Private, Protected, Public).
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.AccessModifier} instead.
  */
+@Deprecated
 public enum AccessModifier {
     DEFAULT, PRIVATE, PUBLIC, PROTECTED
 }
index 4e248f06d13b5f4086bba74318c3fd38826e61c6..94e139c9914a354250ff7065161dcd9a72785284 100644 (file)
@@ -15,13 +15,16 @@ import java.util.List;
  * For sake of simplicity the Annotation Type is not designed to model exact
  * behaviour of annotation mechanism, but just to hold information needed to
  * model annotation over java Type definition.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.AnnotationType} instead.
  */
+@Deprecated
 public interface AnnotationType extends Type {
 
     /**
      * Returns the List of Annotations. <br>
      * Each Annotation Type MAY have defined multiple Annotations.
-     * 
+     *
      * @return the List of Annotations.
      */
     List<AnnotationType> getAnnotations();
@@ -30,7 +33,7 @@ public interface AnnotationType extends Type {
      * Returns Parameter Definition assigned for given parameter name. <br>
      * If Annotation does not contain parameter with specified param name, the
      * method MAY return <code>null</code> value.
-     * 
+     *
      * @param paramName
      *            Parameter Name
      * @return Parameter Definition assigned for given parameter name.
@@ -39,21 +42,21 @@ public interface AnnotationType extends Type {
 
     /**
      * Returns List of all parameters assigned to Annotation Type.
-     * 
+     *
      * @return List of all parameters assigned to Annotation Type.
      */
     List<Parameter> getParameters();
 
     /**
      * Returns List of parameter names.
-     * 
+     *
      * @return List of parameter names.
      */
     List<String> getParameterNames();
 
     /**
      * Returns <code>true</code> if annotation contains parameters.
-     * 
+     *
      * @return <code>true</code> if annotation contains parameters.
      */
     boolean containsParameters();
@@ -73,7 +76,7 @@ public interface AnnotationType extends Type {
 
         /**
          * Returns the Name of the parameter.
-         * 
+         *
          * @return the Name of the parameter.
          */
         String getName();
@@ -81,7 +84,7 @@ public interface AnnotationType extends Type {
         /**
          * Returns value in String format if Parameter contains singular value,
          * otherwise MAY return <code>null</code>.
-         * 
+         *
          * @return value in String format if Parameter contains singular value.
          */
         String getValue();
@@ -91,7 +94,7 @@ public interface AnnotationType extends Type {
          * assigned for given parameter name. <br>
          * If there are multiple values assigned for given parameter name the
          * method MUST NOT return empty List.
-         * 
+         *
          * @return List of Parameter assigned values in order in which they were
          *         assigned for given parameter name.
          */
index 703c58d70bc96fae94d7c69cc33a152b771f6cdd..e855018d7ef48c86198a1dc6814211567fe0e6c8 100644 (file)
@@ -10,7 +10,10 @@ package org.opendaylight.yangtools.sal.binding.model.api;
 /**
  * The BaseTypeWithRestrictions is marker interface that encapsulates definition of java
  * concrete type only with changed restriction values.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.BaseTypeWithRestrictions} instead.
  */
+@Deprecated
 public interface BaseTypeWithRestrictions extends ConcreteType {
 
 }
\ No newline at end of file
index bde957b209870feffb1b94f509d0b3b45d4ee344..e7c08f23d231532c5da9ee00163078230da41067 100644 (file)
@@ -9,13 +9,15 @@ package org.opendaylight.yangtools.sal.binding.model.api;
 
 /**
  * Transformates virtual data to the concrete code in programming language.
- * 
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.CodeGenerator} instead.
  */
+@Deprecated
 public interface CodeGenerator {
 
     /**
      * Generates code for <code>type</code>.
-     * 
+     *
      * @param type
      *            Input type to be processed
      * @return generated JAVA code
@@ -25,11 +27,11 @@ public interface CodeGenerator {
     /**
      * Checks if the concrete instance of <code>type</code> fit to concrete
      * implementation of this interface.
-     * 
+     *
      * (e. g. method return true if in <code>EnumGenerator</code> (which
      * implements this interface) has input parameter of type Enumeration (which
      * is subtype of Type)
-     * 
+     *
      * @param type
      *            Input type to be processed
      * @return true if type is acceptable for processing.
@@ -38,7 +40,7 @@ public interface CodeGenerator {
 
     /**
      * Returns name of <code>type</code> parameter.
-     * 
+     *
      * @param type
      *            Input type to be processed
      * @return name of generated unit
index 52adeb9325c36b8d2338ecd86e4c521ee14e010c..b41b5bd37d3b1d93f2779c553a4031b64a1f0ced 100644 (file)
@@ -10,7 +10,10 @@ package org.opendaylight.yangtools.sal.binding.model.api;
 /**
  * The Concrete Type is marker interface that encapsulates definition of java
  * concrete type.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.ConcreteType} instead.
  */
+@Deprecated
 public interface ConcreteType extends Type {
 
     Restrictions getRestrictions();
index 31d673c7028d9b292c3b16fc7e87dfd56b6e8c4c..5f9905c11f5110f626d6757f968766a069153ea7 100644 (file)
@@ -19,19 +19,22 @@ package org.opendaylight.yangtools.sal.binding.model.api;
  * type name (e.g. fully qualified name). From this string user should be able
  * to determine to which type can be {@link #getValue()} type typecasted to
  * unbox and provide value assigned to constant.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.Constant} instead.
  */
+@Deprecated
 public interface Constant {
 
     /**
      * Returns the Type that declares constant.
-     * 
+     *
      * @return the Type that declares constant.
      */
     Type getDefiningType();
 
     /**
      * Returns the return Type (or just Type) of the Constant.
-     * 
+     *
      * @return the return Type (or just Type) of the Constant.
      */
     Type getType();
@@ -39,14 +42,14 @@ public interface Constant {
     /**
      * Returns the name of constant. <br>
      * By conventions the name SHOULD be in CAPITALS separated with underscores.
-     * 
+     *
      * @return the name of constant.
      */
     String getName();
 
     /**
      * Returns boxed value that is assigned for context.
-     * 
+     *
      * @return boxed value that is assigned for context.
      */
     Object getValue();
@@ -56,7 +59,7 @@ public interface Constant {
      * <br>
      * The expected string SHOULD be in format: <code>public final
      * static [Type] CONSTANT_NAME = [value];</code>
-     * 
+     *
      * @return Constant definition in formatted string.
      */
     String toFormattedString();
index 484d7d47b9266ffb9a75e644e6a55864ce5a72e4..8530775440675adeb4e9582eb213c78267857d26 100644 (file)
@@ -12,7 +12,10 @@ import org.opendaylight.yangtools.yang.common.QName;
 /**
  * Implementing this interface allows an object to hold information which are
  * essential for generating java doc from type definition.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.DocumentedType} instead.
  */
+@Deprecated
 public interface DocumentedType {
 
     /**
index 55f5c502af30311955c16436fc612bcc8f23e8a3..d06e51e7b8491622dbd0d860402a5988e089a1b8 100644 (file)
@@ -13,7 +13,10 @@ import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
 
 /**
  * Interface provide methods for reading data of enumeration class.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.Enumeration} instead.
  */
+@Deprecated
 public interface Enumeration extends GeneratedType {
 
     /**
index 0464db43bf17b35c921d83014c10f3321f553d89..b18c40bdace02c91555e0b603af75a7dd3590a38 100644 (file)
@@ -14,7 +14,10 @@ package org.opendaylight.yangtools.sal.binding.model.api;
  * their access counterparts (getters and setters).
  *
  * @see MethodSignature
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.GeneratedProperty} instead.
  */
+@Deprecated
 public interface GeneratedProperty extends TypeMember {
 
     String getValue();
index d9d7f320c45ef79a0068fc7bbc4945f0455235e0..f8973cc587442c8e94a1484d6a232c2423b4ae50 100644 (file)
@@ -7,6 +7,10 @@
  */
 package org.opendaylight.yangtools.sal.binding.model.api;
 
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.GeneratedTransferIdentityObject} instead.
+ */
+@Deprecated
 public interface GeneratedTransferIdentityObject extends
         GeneratedTransferObject {
 
index f96ade0f411c73d76f6d8fd20a23a72683c43129..223a4312aa1cbd83edc54182cd47f7630df99ca0 100644 (file)
@@ -22,7 +22,9 @@ import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
  * {@link #getEqualsIdentifiers ()}, {@link #getHashCodeIdentifiers()} and
  * {@link #getToStringIdentifiers ()}.
  *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.GeneratedTransferObject} instead.
  */
+@Deprecated
 public interface GeneratedTransferObject extends GeneratedType {
 
     GeneratedProperty getSUID();
index 0e9b51ee741f42bb5952961421d046c7c52efa2a..d1d8ac0957ba191853a46c2bd67bf21e31b9f0ac 100644 (file)
@@ -32,7 +32,10 @@ import java.util.List;
  * By the definition of the interface constant, enum, enclosed types and method
  * definitions MUST be public, so there is no need to specify the scope of
  * visibility.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.GeneratedType} instead.
  */
+@Deprecated
 public interface GeneratedType extends Type, DocumentedType {
 
     /**
index 00699b90b78c7d6707b32092fea074d418f7c453..c7f61e784bdd685083dd8303b6871443c0b126e5 100644 (file)
@@ -20,7 +20,10 @@ import java.util.List;
  * <code>null</code> values. <br>
  * The defining Type contains the reference to Generated Type that declares
  * Method Signature.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.MethodSignature} instead.
  */
+@Deprecated
 public interface MethodSignature extends TypeMember {
 
     /**
@@ -30,7 +33,7 @@ public interface MethodSignature extends TypeMember {
      * in front of each method. <br>
      * The abstract methods are allowed in Class definitions but only when the
      * class is declared as abstract.
-     * 
+     *
      * @return <code>true</code> if the method signature is defined as abstract.
      */
     boolean isAbstract();
@@ -38,7 +41,7 @@ public interface MethodSignature extends TypeMember {
     /**
      * Returns the List of parameters that method declare. If the method does
      * not contain any parameters, the method will return empty List.
-     * 
+     *
      * @return the List of parameters that method declare.
      */
     List<Parameter> getParameters();
@@ -53,14 +56,14 @@ public interface MethodSignature extends TypeMember {
 
         /**
          * Returns the parameter name.
-         * 
+         *
          * @return the parameter name.
          */
         String getName();
 
         /**
          * Returns Type that is bounded to parameter name.
-         * 
+         *
          * @return Type that is bounded to parameter name.
          */
         Type getType();
index 06b84987e2c68f99aaf04c10e07921254fe65e85..0e797a562ca74100db95e0b2ee4d0dd96903d55d 100644 (file)
@@ -13,7 +13,10 @@ package org.opendaylight.yangtools.sal.binding.model.api;
  * The parametrized Type is designed to be used to store information of Java
  * Generic Type. The array of {@link #getActualTypeArguments()} holds
  * information of all generic parameters defined for Parameterized Type.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.ParameterizedType} instead.
  */
+@Deprecated
 public interface ParameterizedType extends Type {
 
     /**
index 292b63244a43c1c861e0f5717234b75057db740c..fee396941a39a81745a472b5be9d0b9b23561619 100644 (file)
@@ -13,6 +13,11 @@ import org.opendaylight.yangtools.yang.model.api.type.LengthConstraint;
 import org.opendaylight.yangtools.yang.model.api.type.PatternConstraint;
 import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
 
+/**
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.Restrictions} instead.
+ */
+@Deprecated
 public interface Restrictions {
 
     List<LengthConstraint> getLengthConstraints();
index c259d596ed36f8740179669fcfa03fd7a6a67976..02355c68676abf7def598c0f4334f3525a957561 100644 (file)
@@ -12,19 +12,21 @@ package org.opendaylight.yangtools.sal.binding.model.api;
  * Type defined in java MUST contain name and package name, except of primitive
  * types like int, byte etc. In case of mapping of primitive type the package
  * name MUST be left as empty string.
- * 
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.Type} instead.
  */
+@Deprecated
 public interface Type {
     /**
      * Returns name of the package that interface belongs to.
-     * 
+     *
      * @return name of the package that interface belongs to
      */
     String getPackageName();
 
     /**
      * Returns name of the interface.
-     * 
+     *
      * @return name of the interface.
      */
     String getName();
@@ -38,7 +40,7 @@ public interface Type {
      * <li>If Type contains package name: [package name].[type name] (e.g
      * java.lang.Byte, org.opendaylight.controller.gen.GenType)</li>
      * </ul>
-     * 
+     *
      * @return fully qualified name of Type.
      */
     String getFullyQualifiedName();
index 2447e21fee4737205b07c56ca1b92603a55778b4..89d33e3f727112b1fbad3c4f215ba00f3bcf7d06 100644 (file)
@@ -11,7 +11,10 @@ import java.util.List;
 
 /**
  * Common interface for variables and methods in class.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.TypeMember} instead.
  */
+@Deprecated
 public interface TypeMember {
 
     /**
index 7246de6e24c22926f2395dfc3de3167e65c3d682..b7d8946c8dd11d44f8797e88f6e369bec339a9b2 100644 (file)
@@ -8,11 +8,13 @@
 package org.opendaylight.yangtools.sal.binding.model.api;
 
 /**
- * 
+ *
  * Marker interface which assign to object property that it is bounded wildcard
  * type.
- * 
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.WildcardType} instead.
  */
+@Deprecated
 public interface WildcardType extends Type {
 
 }
index c9ded321d3b24a4e1261cbb8f7a491417b13bb16..5262d73148f09c27a580ebf8a5e4bb2d49c6d07d 100644 (file)
@@ -18,9 +18,12 @@ import org.opendaylight.yangtools.sal.binding.model.api.Type;
  * {@link Type} interface. The Annotation Type contains set of methods which are
  * capable to provide information about other Annotation Types and Annotation
  * Parameters.
- * 
+ *
  * @see AnnotationType
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.AnnotationTypeBuilder} instead.
  */
+@Deprecated
 public interface AnnotationTypeBuilder extends Type {
 
     /**
@@ -29,7 +32,7 @@ public interface AnnotationTypeBuilder extends Type {
      * Neither the package name or annotation name can contain <code>null</code>
      * references. In case that any of parameters contains <code>null</code> the
      * method SHOULD thrown {@link IllegalArgumentException}
-     * 
+     *
      * @param packageName
      *            Package Name of Annotation Type
      * @param name
@@ -46,7 +49,7 @@ public interface AnnotationTypeBuilder extends Type {
      * Neither the param name or value can contain <code>null</code> references.
      * In case that any of parameters contains <code>null</code> the method
      * SHOULD thrown {@link IllegalArgumentException}
-     * 
+     *
      * @param paramName
      *            Parameter Name
      * @param value
@@ -65,7 +68,7 @@ public interface AnnotationTypeBuilder extends Type {
      * Neither the param name or value can contain <code>null</code> references.
      * In case that any of parameters contains <code>null</code> the method
      * SHOULD thrown {@link IllegalArgumentException}
-     * 
+     *
      * @param paramName
      *            Parameter Name
      * @param values
@@ -82,7 +85,7 @@ public interface AnnotationTypeBuilder extends Type {
      * modification to Annotation Type Builder will have an impact to
      * instantiated Annotation Type. <br>
      * For this purpose call this method after all additions are complete.
-     * 
+     *
      * @return <code>new</code> <i>immutable</i> instance of Annotation Type.
      */
     AnnotationType toInstance();
index de3f0906017440ab8bf50b28eb01eed30144f90f..52866fdfad2f8f903f60e2f8813a3b3ca53dab9a 100644 (file)
@@ -12,7 +12,9 @@ import org.opendaylight.yangtools.sal.binding.model.api.Type;
 
 /**
  *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.ConstantBuilder} instead.
  */
+@Deprecated
 public interface ConstantBuilder {
 
     void assignValue(final Object value);
index c0a99b9845e66ef8320e7caadf0dc0bdd2fd9843..29849cdba982aff1bf21cc1b86ac21288425faaf 100644 (file)
@@ -16,7 +16,10 @@ import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition;
  * Enumeration definition.
  *
  * @see Enumeration
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.EnumBuilder} instead.
  */
+@Deprecated
 public interface EnumBuilder extends Type {
 
     /**
index cd4b9b45757a25e99454e1f5e4a9f5ba9cbbc687..746e8f992712d6dc0a599ca3a60e5047c7604a88 100644 (file)
@@ -15,7 +15,10 @@ import org.opendaylight.yangtools.sal.binding.model.api.Type;
  * instantiate Generated Property definition.
  *
  * @see GeneratedProperty
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.GeneratedPropertyBuilder} instead.
  */
+@Deprecated
 public interface GeneratedPropertyBuilder extends TypeMemberBuilder<GeneratedPropertyBuilder> {
 
     GeneratedPropertyBuilder setValue(String value);
index ca25dade4fdd0a2cf65bccb907cd3ace93a212dc..33f7d4f6ba0cb73be72102047d8723e8aab50d93 100644 (file)
@@ -16,7 +16,10 @@ import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
  * and instantiate Generated Transfer Object definition.
  *
  * @see GeneratedTransferObject
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.GeneratedTOBuilder} instead.
  */
+@Deprecated
 public interface GeneratedTOBuilder extends GeneratedTypeBuilderBase<GeneratedTOBuilder> {
 
     /**
index 9756bd209250b207e0689bc841fd1ce5bc185903..c6783f7cc19b12399d8e1c607cbe308ac10f7a9f 100644 (file)
@@ -12,14 +12,17 @@ import org.opendaylight.yangtools.sal.binding.model.api.GeneratedType;
 /**
  * Generated Type Builder interface is helper interface for building and
  * defining the GeneratedType.
- * 
+ *
  * @see GeneratedType
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.GeneratedTypeBuilder} instead.
  */
+@Deprecated
 public interface GeneratedTypeBuilder extends GeneratedTypeBuilderBase<GeneratedTypeBuilder> {
 
     /**
      * Returns the <code>new</code> <i>immutable</i> instance of Generated Type.
-     * 
+     *
      * @return the <code>new</code> <i>immutable</i> instance of Generated Type.
      */
     GeneratedType toInstance();
index cc95e198ab4349178bb522d18339bdc36eb1c4f3..674dfc0842682f03a61704c57dd473faabeb372c 100644 (file)
@@ -13,6 +13,10 @@ import org.opendaylight.yangtools.sal.binding.model.api.Constant;
 import org.opendaylight.yangtools.sal.binding.model.api.Type;
 import org.opendaylight.yangtools.yang.common.QName;
 
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.GeneratedTypeBuilderBase} instead.
+ */
+@Deprecated
 public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>> extends Type {
 
     /**
index 71374525b752f1e7b0d5a8a7236700c7ea26978f..5e49295f72c45260d541b8367aeee3bbf3069a1f 100644 (file)
@@ -24,7 +24,10 @@ import org.opendaylight.yangtools.sal.binding.model.api.Type;
  *
  *
  * @see MethodSignature
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.MethodSignatureBuilder} instead.
  */
+@Deprecated
 public interface MethodSignatureBuilder extends TypeMemberBuilder<MethodSignatureBuilder> {
 
     /**
index aa44be4ef9a540e8222a3f82f2df50c0f7286947..dda30bac6b26c284d911bb10a5186204a8164c4f 100644 (file)
@@ -11,8 +11,9 @@ import org.opendaylight.yangtools.sal.binding.model.api.AccessModifier;
 import org.opendaylight.yangtools.sal.binding.model.api.Type;
 
 /**
- *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.TypeMemberBuilder} instead.
  */
+@Deprecated
 public interface TypeMemberBuilder<T extends TypeMemberBuilder<T>> {
 
     /**