Fix for Bug 511 (yang)
authorMartin Vitez <mvitez@cisco.com>
Thu, 13 Mar 2014 12:00:30 +0000 (13:00 +0100)
committerMartin Vitez <mvitez@cisco.com>
Tue, 18 Mar 2014 08:06:48 +0000 (09:06 +0100)
Removed \r characters from all projects under yang directory.

Change-Id: I46a47d523449bc159ea508143d9a06726f8259ff
Signed-off-by: Martin Vitez <mvitez@cisco.com>
24 files changed:
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/Augmentable.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/Augmentation.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/BaseIdentity.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/DataContainer.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/DataObject.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/DataRoot.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/Identifiable.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/Identifier.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/Notification.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/NotificationListener.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/RpcImplementation.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/RpcInput.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/RpcService.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/annotations/RoutingContext.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/package-info.java
yang/yang-binding/src/test/java/org/opendaylight/yangtools/yang/binding/test/InstanceIdentifierTest.java
yang/yang-binding/src/test/java/org/opendaylight/yangtools/yang/binding/test/mock/FooChild.java
yang/yang-binding/src/test/java/org/opendaylight/yangtools/yang/binding/test/mock/GroupingFoo.java
yang/yang-binding/src/test/java/org/opendaylight/yangtools/yang/binding/test/mock/InstantiatedFoo.java
yang/yang-binding/src/test/java/org/opendaylight/yangtools/yang/binding/test/mock/Node.java
yang/yang-binding/src/test/java/org/opendaylight/yangtools/yang/binding/test/mock/NodeChild.java
yang/yang-binding/src/test/java/org/opendaylight/yangtools/yang/binding/test/mock/NodeChildKey.java
yang/yang-binding/src/test/java/org/opendaylight/yangtools/yang/binding/test/mock/NodeKey.java
yang/yang-binding/src/test/java/org/opendaylight/yangtools/yang/binding/test/mock/Nodes.java

index 340bd5b46dd2811fd0ba60cf247dad2fe12475fd..c562a77d4fdc75bb4cd49263aa694bc6804df3db 100644 (file)
@@ -1,34 +1,34 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-/**\r
- * Augmentable (extensible) object which could carry additional data defined by\r
- * third-party extension, without introducing conflict between various\r
- * extension.\r
- * \r
- * This interface uses extended version of ExtensibleInterface pattern which\r
- * also adds marker interface for augmentations (extensions) -\r
- * {@link Augmentable}\r
- * \r
- * @author Tony Tkacik <ttkacik@cisco.com>\r
- * @param <T>\r
- *            Base class which should implements this interface and is target\r
- *            for augmentation.\r
- */\r
-public interface Augmentable<T> {\r
-\r
-    /**\r
-     * Returns instance of augmentation.\r
-     * \r
-     * @param augmentationType\r
-     *            Type of augmentation to be returned.\r
-     * @return instance of augmentation.\r
-     */\r
-    <E extends Augmentation<T>> E getAugmentation(Class<E> augmentationType);\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+/**
+ * Augmentable (extensible) object which could carry additional data defined by
+ * third-party extension, without introducing conflict between various
+ * extension.
+ * 
+ * This interface uses extended version of ExtensibleInterface pattern which
+ * also adds marker interface for augmentations (extensions) -
+ * {@link Augmentable}
+ * 
+ * @author Tony Tkacik <ttkacik@cisco.com>
+ * @param <T>
+ *            Base class which should implements this interface and is target
+ *            for augmentation.
+ */
+public interface Augmentable<T> {
+
+    /**
+     * Returns instance of augmentation.
+     * 
+     * @param augmentationType
+     *            Type of augmentation to be returned.
+     * @return instance of augmentation.
+     */
+    <E extends Augmentation<T>> E getAugmentation(Class<E> augmentationType);
+}
index a89f030cdb430295ee05c4c9f743a8d6d1e2eb1f..cb6f1a1e758cfcff34ced3445c9939aa5e1fc572 100644 (file)
@@ -1,26 +1,26 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-/**\r
- * Augmentation (extension) of other interface.\r
- * \r
- * This interface uniquely bounds Augmentation to generated \r
- * interface.\r
- * \r
- * All interfaces generated from YANG Augmentation statement\r
- * must implement this interface with parameter <code>P</code>\r
- * which uniquely points to it's target class.\r
- * \r
- * \r
- *\r
- * @param <T> Class to which this implementation is extension.\r
- */\r
-public interface Augmentation<T> {\r
-\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+/**
+ * Augmentation (extension) of other interface.
+ * 
+ * This interface uniquely bounds Augmentation to generated 
+ * interface.
+ * 
+ * All interfaces generated from YANG Augmentation statement
+ * must implement this interface with parameter <code>P</code>
+ * which uniquely points to it's target class.
+ * 
+ * 
+ *
+ * @param <T> Class to which this implementation is extension.
+ */
+public interface Augmentation<T> {
+
+}
index 0c4a7beaf121b63fce087df6454a13829425cade..9f55b64d52201e232f1de572fa56b53ecadd3725 100644 (file)
@@ -1,23 +1,23 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-/**\r
- * Base Identity\r
- * \r
- */\r
-public abstract class BaseIdentity {\r
-\r
-    public final static BaseIdentity INSTANCE = new BaseIdentity() {\r
-    };\r
-\r
-    protected BaseIdentity() {\r
-\r
-    }\r
-\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+/**
+ * Base Identity
+ * 
+ */
+public abstract class BaseIdentity {
+
+    public final static BaseIdentity INSTANCE = new BaseIdentity() {
+    };
+
+    protected BaseIdentity() {
+
+    }
+
+}
index 67b20dd1f209fafa9aa675af52792571105d4526..0e1937d2bc1616a1e8ef57dfd7c986fe3f11d5e0 100644 (file)
@@ -1,29 +1,29 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-/**\r
- * Data Container - object contains structured data\r
- * \r
- * Marker interface which must be implmeneted by all interfaces\r
- * generated for YANG:\r
- * <ul>\r
- * <li>Rpc Input\r
- * <li>Output \r
- * <li>Notification\r
- * <li>Container\r
- * <li>List\r
- * <li>Case\r
- * </ul>\r
- * \r
- *\r
- */\r
-public interface DataContainer {\r
-\r
-    public Class<? extends DataContainer> getImplementedInterface();\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+/**
+ * Data Container - object contains structured data
+ * 
+ * Marker interface which must be implmeneted by all interfaces
+ * generated for YANG:
+ * <ul>
+ * <li>Rpc Input
+ * <li>Output 
+ * <li>Notification
+ * <li>Container
+ * <li>List
+ * <li>Case
+ * </ul>
+ * 
+ *
+ */
+public interface DataContainer {
+
+    public Class<? extends DataContainer> getImplementedInterface();
+}
index 62f103094706d38d75792a89e8ebb2669f036536..b0ca831500b3351ee37a92eab9e50716a9d157f6 100644 (file)
@@ -1,20 +1,20 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-/**\r
- * Data container is an interface which has structured contents.\r
- * \r
- * \r
- * @author Tony Tkacik <ttkacik@cisco.com>\r
- *\r
- */\r
-public interface DataObject extends DataContainer {\r
-\r
-\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+/**
+ * Data container is an interface which has structured contents.
+ * 
+ * 
+ * @author Tony Tkacik <ttkacik@cisco.com>
+ *
+ */
+public interface DataObject extends DataContainer {
+
+
+}
index 5882b5159e4b221990a6dd58d677e248baed78f8..66fdfdeb908c5d276d3a946fd2dd5047439c7eaf 100644 (file)
@@ -1,16 +1,16 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-/**\r
- * Data Root of YANG module\r
- * \r
- */\r
-public interface DataRoot {\r
-\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+/**
+ * Data Root of YANG module
+ * 
+ */
+public interface DataRoot {
+
+}
index b5b8e8585802753fc8c8a76b1e1ee33ad619aed5..6f45c8cdd5403ea1913511ece496a7206f7c1626 100644 (file)
@@ -1,26 +1,26 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-\r
-/**\r
- * Identifiable object, which could be identified by it's key\r
- * \r
- * @author ttkacik\r
- *\r
- * @param <T> Identifier class for this object\r
- */\r
-public interface Identifiable<T extends Identifier<? extends Identifiable<T>>> {\r
-    \r
-    /**\r
-     * Returns an unique key for the object\r
-     * \r
-     * @return Key for the object\r
-     */\r
-    T getKey();\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+
+/**
+ * Identifiable object, which could be identified by it's key
+ * 
+ * @author ttkacik
+ *
+ * @param <T> Identifier class for this object
+ */
+public interface Identifiable<T extends Identifier<? extends Identifiable<T>>> {
+    
+    /**
+     * Returns an unique key for the object
+     * 
+     * @return Key for the object
+     */
+    T getKey();
+}
index 6a2893d9c9c2a4679d514f3aa631f53c11287966..a99b451b6ee9ccae2f9b219650e1607a35cc6858 100644 (file)
@@ -1,22 +1,22 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-/**\r
- * \r
- * Object is unique identifier for another object\r
- * \r
- * \r
- * \r
- * @param <T>\r
- *            Class of object for which this object is identifier\r
- * @author ttkacik\r
- */\r
-public interface Identifier<T extends Identifiable<?>> extends org.opendaylight.yangtools.concepts.Identifier {\r
-\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+/**
+ * 
+ * Object is unique identifier for another object
+ * 
+ * 
+ * 
+ * @param <T>
+ *            Class of object for which this object is identifier
+ * @author ttkacik
+ */
+public interface Identifier<T extends Identifiable<?>> extends org.opendaylight.yangtools.concepts.Identifier {
+
+}
index 677f5869b875d19a5ecc88fa454dd913e82d43e3..fca5230fbd3653dc80746f662cd2bcb26d48166f 100644 (file)
@@ -1,18 +1,18 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-/**\r
- * Marker interface for YANG-defined notifications\r
- *\r
- *\r
- */\r
-public interface Notification extends DataContainer {\r
-\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+/**
+ * Marker interface for YANG-defined notifications
+ *
+ *
+ */
+public interface Notification extends DataContainer {
+
+}
 
index e01a1ad53b4cce8c8c33a1e884b395ee9ea35d68..3a8a786a7fa978b84551bfaf78e8db2ef0abc680 100644 (file)
@@ -1,28 +1,28 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-import java.util.EventListener;\r
-\r
-/**\r
- * Marker interface for generated notification listener interfaces\r
- * \r
- * <p>\r
- * The subclasses of this interface have callbacks for events, which are derived\r
- * from {@link Notification} class in form void\r
- * on{NotificationType}(NotificationType notification).\r
- * \r
- * <p>\r
- * E.g. if we have notification SessionUp the callback will have signature:\r
- * <code>void  onSessionUp(SessionUp notification)</code>\r
- * \r
- * \r
- */\r
-public interface NotificationListener extends EventListener {\r
-\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+import java.util.EventListener;
+
+/**
+ * Marker interface for generated notification listener interfaces
+ * 
+ * <p>
+ * The subclasses of this interface have callbacks for events, which are derived
+ * from {@link Notification} class in form void
+ * on{NotificationType}(NotificationType notification).
+ * 
+ * <p>
+ * E.g. if we have notification SessionUp the callback will have signature:
+ * <code>void  onSessionUp(SessionUp notification)</code>
+ * 
+ * 
+ */
+public interface NotificationListener extends EventListener {
+
+}
index 889049d9e8817144ff480692d2b0badd79d0e686..4761fddd521b0e2f5ceb72f3110b5d36480ed186 100644 (file)
@@ -1,22 +1,22 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-import java.util.Set;\r
-import java.util.concurrent.Future;\r
-\r
-import org.opendaylight.yangtools.yang.common.RpcResult;\r
-\r
-public interface RpcImplementation {\r
-\r
-    // Fixme: Change to RpcInput\r
-    Set<Class<? extends DataContainer>> getSupportedInputs();\r
-\r
-    // Fixme: Change to RpcInput\r
-    <T extends DataContainer> Future<RpcResult<?>> invoke(Class<T> type, T input);\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+import java.util.Set;
+import java.util.concurrent.Future;
+
+import org.opendaylight.yangtools.yang.common.RpcResult;
+
+public interface RpcImplementation {
+
+    // Fixme: Change to RpcInput
+    Set<Class<? extends DataContainer>> getSupportedInputs();
+
+    // Fixme: Change to RpcInput
+    <T extends DataContainer> Future<RpcResult<?>> invoke(Class<T> type, T input);
+}
index 546e1baf1e002b622296439be405fa3437704534..11b95bdea51492e298b2e5d688223529c879592f 100644 (file)
@@ -1,12 +1,12 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-public interface RpcInput extends DataContainer {\r
-\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+public interface RpcInput extends DataContainer {
+
+}
index 6e6a46d0ee4cf35867b3abdb7187c0f5392ec729..3757f5e024f32f93a16fb1faeefe7b2a8e56c77f 100644 (file)
@@ -1,16 +1,16 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.binding;\r
-\r
-/**\r
- * Marker interface for tagging generated YANG Modules\r
- *\r
- */\r
-public interface RpcService {\r
-\r
-}\r
+/*
+ * 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.yangtools.yang.binding;
+
+/**
+ * Marker interface for tagging generated YANG Modules
+ *
+ */
+public interface RpcService {
+
+}
index 0ee9bf352b489ed1f2c835d4414900c501bb1647..169d9ef825e25da9454676d81781fd520c6b8793 100644 (file)
@@ -5,23 +5,23 @@
  * 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.yang.binding.annotations;\r
-\r
-import java.lang.annotation.Documented;\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Inherited;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-import org.opendaylight.yangtools.yang.binding.BaseIdentity;\r
-\r
-\r
-@Inherited\r
-@Documented\r
-@Target(ElementType.METHOD)\r
-@Retention(RetentionPolicy.RUNTIME)\r
-public @interface RoutingContext {\r
-\r
-    Class<? extends BaseIdentity> value();\r
-}\r
+package org.opendaylight.yangtools.yang.binding.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.opendaylight.yangtools.yang.binding.BaseIdentity;
+
+
+@Inherited
+@Documented
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RoutingContext {
+
+    Class<? extends BaseIdentity> value();
+}
index ace08d625e558ea2aafd045d86e2ced374b0c517..eee24a978e693ef0e6ec637f62403ceb8c148311 100644 (file)
@@ -1,8 +1,8 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
+/*
+ * 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.yangtools.yang.binding;
\ No newline at end of file
index 544ab5d44d18df78fe92ea73eeab756bdfee2422..074624b1e53ea4bc9a5d6259a12fe09cb124232f 100644 (file)
  * 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.yang.binding.test;\r
-\r
-import static org.junit.Assert.*;\r
-\r
-import org.junit.Test;\r
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;\r
-import org.opendaylight.yangtools.yang.binding.test.mock.FooChild;\r
-import org.opendaylight.yangtools.yang.binding.test.mock.InstantiatedFoo;\r
-import org.opendaylight.yangtools.yang.binding.test.mock.Node;\r
-import org.opendaylight.yangtools.yang.binding.test.mock.NodeChild;\r
-import org.opendaylight.yangtools.yang.binding.test.mock.NodeChildKey;\r
-import org.opendaylight.yangtools.yang.binding.test.mock.NodeKey;\r
-import org.opendaylight.yangtools.yang.binding.test.mock.Nodes;\r
-\r
-public class InstanceIdentifierTest {\r
-\r
-    @Test\r
-    public void constructWithPredicates() {\r
-        \r
-        InstanceIdentifier<Nodes> nodes = InstanceIdentifier.builder(Nodes.class).toInstance();\r
-        \r
-        assertNotNull(nodes);\r
-        assertEquals(Nodes.class, nodes.getTargetType());\r
-        \r
-        \r
-        InstanceIdentifier<Node> node = InstanceIdentifier.builder(nodes).node(Node.class).toInstance();\r
-        \r
-        assertNotNull(node);\r
-        assertEquals(Node.class, node.getTargetType());\r
-        \r
-        assertTrue(nodes.contains(node));\r
-    }\r
-\r
-    @Test\r
-    public void fluentConstruction() {\r
-\r
-        InstanceIdentifier<Nodes> nodes = InstanceIdentifier.builder(Nodes.class).toInstance();\r
-        InstanceIdentifier<Node> node = InstanceIdentifier.builder(Nodes.class).child(Node.class,new NodeKey(10)).toInstance();\r
-\r
-        assertNotNull(node);\r
-        assertEquals(Node.class, node.getTargetType());\r
-\r
-        assertTrue(nodes.contains(node));\r
-    }\r
-   \r
-    \r
-    @Test\r
-    public void negativeContains() {\r
-        InstanceIdentifier<FooChild> fooChild = InstanceIdentifier.builder(Nodes.class).child(InstantiatedFoo.class).child(FooChild.class).build();\r
-        \r
-        InstanceIdentifier<Node> nodeTen = InstanceIdentifier.builder(Nodes.class) //\r
-                .child(Node.class,new NodeKey(10)).toInstance();\r
-        InstanceIdentifier<Node> nodeOne = InstanceIdentifier.builder(Nodes.class) //\r
-                .child(Node.class,new NodeKey(1)).toInstance();\r
-        InstanceIdentifier<Nodes> nodes = InstanceIdentifier.builder(Nodes.class).toInstance();\r
-    \r
-        assertFalse(fooChild.contains(nodeTen));\r
-        assertFalse(nodeTen.contains(nodes));\r
-        \r
-        assertFalse(nodeOne.contains(nodes));\r
-        assertTrue(nodes.contains(nodeOne));\r
-    }\r
-    \r
-    @Test\r
-    public void containsWildcarded() {\r
-        InstanceIdentifier<Nodes> nodes = InstanceIdentifier.builder(Nodes.class).toInstance();\r
-        InstanceIdentifier<Node> wildcarded = InstanceIdentifier.builder(Nodes.class).child(Node.class).build();\r
-        InstanceIdentifier<NodeChild> wildcardedChildren = InstanceIdentifier.builder(Nodes.class) //\r
-                .child(Node.class) //\r
-                .child(NodeChild.class).build();\r
-        \r
-        assertTrue(wildcarded.isWildcarded());\r
-        assertTrue(wildcardedChildren.isWildcarded());\r
-        \r
-        \r
-        InstanceIdentifier<Node> nodeTen = InstanceIdentifier.builder(Nodes.class) //\r
-                .child(Node.class,new NodeKey(10)).toInstance();\r
-        InstanceIdentifier<Node> nodeOne = InstanceIdentifier.builder(Nodes.class) //\r
-                .child(Node.class,new NodeKey(1)).toInstance();\r
-        \r
-        assertFalse(nodeTen.isWildcarded());\r
-        assertFalse(nodeOne.isWildcarded());\r
-        assertTrue(nodes.containsWildcarded(nodeOne));\r
-        assertTrue(wildcarded.containsWildcarded(nodeOne));\r
-        assertTrue(wildcarded.containsWildcarded(nodeTen));\r
-        \r
-        \r
-        InstanceIdentifier<NodeChild> nodeTenChildWildcarded = InstanceIdentifier.builder(Nodes.class) //\r
-                .child(Node.class,new NodeKey(10)).child(NodeChild.class).toInstance();\r
-        \r
-        assertTrue(nodeTenChildWildcarded.isWildcarded());\r
-        \r
-        InstanceIdentifier<NodeChild> nodeTenChild = InstanceIdentifier.builder(Nodes.class) //\r
-                .child(Node.class,new NodeKey(10)).child(NodeChild.class, new NodeChildKey(10)).toInstance();\r
-        InstanceIdentifier<NodeChild> nodeOneChild = InstanceIdentifier.builder(Nodes.class) //\r
-                .child(Node.class,new NodeKey(1)).child(NodeChild.class, new NodeChildKey(1)).toInstance();\r
-\r
-        \r
-        assertFalse(nodeTenChildWildcarded.containsWildcarded(nodeOneChild));\r
-        assertTrue(nodeTenChildWildcarded.containsWildcarded(nodeTenChild));\r
-        \r
-    }\r
-    \r
-    \r
-    void childOfTest() {\r
-        InstanceIdentifier.builder(Nodes.class).child(InstantiatedFoo.class).child(FooChild.class);\r
-    }\r
-\r
-}\r
+package org.opendaylight.yangtools.yang.binding.test;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.test.mock.FooChild;
+import org.opendaylight.yangtools.yang.binding.test.mock.InstantiatedFoo;
+import org.opendaylight.yangtools.yang.binding.test.mock.Node;
+import org.opendaylight.yangtools.yang.binding.test.mock.NodeChild;
+import org.opendaylight.yangtools.yang.binding.test.mock.NodeChildKey;
+import org.opendaylight.yangtools.yang.binding.test.mock.NodeKey;
+import org.opendaylight.yangtools.yang.binding.test.mock.Nodes;
+
+public class InstanceIdentifierTest {
+
+    @Test
+    public void constructWithPredicates() {
+        
+        InstanceIdentifier<Nodes> nodes = InstanceIdentifier.builder(Nodes.class).toInstance();
+        
+        assertNotNull(nodes);
+        assertEquals(Nodes.class, nodes.getTargetType());
+        
+        
+        InstanceIdentifier<Node> node = InstanceIdentifier.builder(nodes).node(Node.class).toInstance();
+        
+        assertNotNull(node);
+        assertEquals(Node.class, node.getTargetType());
+        
+        assertTrue(nodes.contains(node));
+    }
+
+    @Test
+    public void fluentConstruction() {
+
+        InstanceIdentifier<Nodes> nodes = InstanceIdentifier.builder(Nodes.class).toInstance();
+        InstanceIdentifier<Node> node = InstanceIdentifier.builder(Nodes.class).child(Node.class,new NodeKey(10)).toInstance();
+
+        assertNotNull(node);
+        assertEquals(Node.class, node.getTargetType());
+
+        assertTrue(nodes.contains(node));
+    }
+   
+    
+    @Test
+    public void negativeContains() {
+        InstanceIdentifier<FooChild> fooChild = InstanceIdentifier.builder(Nodes.class).child(InstantiatedFoo.class).child(FooChild.class).build();
+        
+        InstanceIdentifier<Node> nodeTen = InstanceIdentifier.builder(Nodes.class) //
+                .child(Node.class,new NodeKey(10)).toInstance();
+        InstanceIdentifier<Node> nodeOne = InstanceIdentifier.builder(Nodes.class) //
+                .child(Node.class,new NodeKey(1)).toInstance();
+        InstanceIdentifier<Nodes> nodes = InstanceIdentifier.builder(Nodes.class).toInstance();
+    
+        assertFalse(fooChild.contains(nodeTen));
+        assertFalse(nodeTen.contains(nodes));
+        
+        assertFalse(nodeOne.contains(nodes));
+        assertTrue(nodes.contains(nodeOne));
+    }
+    
+    @Test
+    public void containsWildcarded() {
+        InstanceIdentifier<Nodes> nodes = InstanceIdentifier.builder(Nodes.class).toInstance();
+        InstanceIdentifier<Node> wildcarded = InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
+        InstanceIdentifier<NodeChild> wildcardedChildren = InstanceIdentifier.builder(Nodes.class) //
+                .child(Node.class) //
+                .child(NodeChild.class).build();
+        
+        assertTrue(wildcarded.isWildcarded());
+        assertTrue(wildcardedChildren.isWildcarded());
+        
+        
+        InstanceIdentifier<Node> nodeTen = InstanceIdentifier.builder(Nodes.class) //
+                .child(Node.class,new NodeKey(10)).toInstance();
+        InstanceIdentifier<Node> nodeOne = InstanceIdentifier.builder(Nodes.class) //
+                .child(Node.class,new NodeKey(1)).toInstance();
+        
+        assertFalse(nodeTen.isWildcarded());
+        assertFalse(nodeOne.isWildcarded());
+        assertTrue(nodes.containsWildcarded(nodeOne));
+        assertTrue(wildcarded.containsWildcarded(nodeOne));
+        assertTrue(wildcarded.containsWildcarded(nodeTen));
+        
+        
+        InstanceIdentifier<NodeChild> nodeTenChildWildcarded = InstanceIdentifier.builder(Nodes.class) //
+                .child(Node.class,new NodeKey(10)).child(NodeChild.class).toInstance();
+        
+        assertTrue(nodeTenChildWildcarded.isWildcarded());
+        
+        InstanceIdentifier<NodeChild> nodeTenChild = InstanceIdentifier.builder(Nodes.class) //
+                .child(Node.class,new NodeKey(10)).child(NodeChild.class, new NodeChildKey(10)).toInstance();
+        InstanceIdentifier<NodeChild> nodeOneChild = InstanceIdentifier.builder(Nodes.class) //
+                .child(Node.class,new NodeKey(1)).child(NodeChild.class, new NodeChildKey(1)).toInstance();
+
+        
+        assertFalse(nodeTenChildWildcarded.containsWildcarded(nodeOneChild));
+        assertTrue(nodeTenChildWildcarded.containsWildcarded(nodeTenChild));
+        
+    }
+    
+    
+    void childOfTest() {
+        InstanceIdentifier.builder(Nodes.class).child(InstantiatedFoo.class).child(FooChild.class);
+    }
+
+}
index 22f6a05e8328f72eb608f80132e1d8f05252131e..bdcbd0afc7c93f246948472c30adc385f74f7cca 100644 (file)
@@ -5,10 +5,10 @@
  * 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.yang.binding.test.mock;\r
-\r
-import org.opendaylight.yangtools.yang.binding.ChildOf;\r
-\r
-public interface FooChild extends ChildOf<GroupingFoo> {\r
-\r
-}\r
+package org.opendaylight.yangtools.yang.binding.test.mock;
+
+import org.opendaylight.yangtools.yang.binding.ChildOf;
+
+public interface FooChild extends ChildOf<GroupingFoo> {
+
+}
index 27f560dbfeed84d1ba502c0f9d429e025042a83c..f86844644d9f9321448a6e79ee0f9d37da560b15 100644 (file)
@@ -5,8 +5,8 @@
  * 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.yang.binding.test.mock;\r
-\r
-public interface GroupingFoo {\r
-\r
-}\r
+package org.opendaylight.yangtools.yang.binding.test.mock;
+
+public interface GroupingFoo {
+
+}
index 615a96c595a34a87d44241fdec1582a77c73936f..2e6348e00f8584c85a9f33820f0a8d2935be4509 100644 (file)
@@ -5,11 +5,11 @@
  * 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.yang.binding.test.mock;\r
-\r
-import org.opendaylight.yangtools.yang.binding.ChildOf;\r
-import org.opendaylight.yangtools.yang.binding.DataObject;\r
-\r
-public interface InstantiatedFoo extends DataObject, GroupingFoo, ChildOf<Nodes> {\r
-\r
-}\r
+package org.opendaylight.yangtools.yang.binding.test.mock;
+
+import org.opendaylight.yangtools.yang.binding.ChildOf;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+
+public interface InstantiatedFoo extends DataObject, GroupingFoo, ChildOf<Nodes> {
+
+}
index e2197ad1e1b366f462f12d1bf298178a0d05b604..71b78f694e0a5cad4075828c70ac448edbf1b4cf 100644 (file)
@@ -5,15 +5,15 @@
  * 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.yang.binding.test.mock;\r
-\r
-import org.opendaylight.yangtools.yang.binding.ChildOf;\r
-import org.opendaylight.yangtools.yang.binding.DataObject;\r
-import org.opendaylight.yangtools.yang.binding.Identifiable;\r
-\r
-public interface Node extends //\r
-    DataObject, //\r
-    Identifiable<NodeKey>, //\r
-    ChildOf<Nodes> {\r
-\r
-}\r
+package org.opendaylight.yangtools.yang.binding.test.mock;
+
+import org.opendaylight.yangtools.yang.binding.ChildOf;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.Identifiable;
+
+public interface Node extends //
+    DataObject, //
+    Identifiable<NodeKey>, //
+    ChildOf<Nodes> {
+
+}
index 4fd5d090b74f4a6a9696bd602404a767b4c1907f..3b0217673f27004650799e277f02d91b8b238cde 100644 (file)
@@ -5,15 +5,15 @@
  * 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.yang.binding.test.mock;\r
-\r
-import org.opendaylight.yangtools.yang.binding.ChildOf;\r
-import org.opendaylight.yangtools.yang.binding.DataObject;\r
-import org.opendaylight.yangtools.yang.binding.Identifiable;\r
-\r
-public interface NodeChild extends //\r
-        DataObject, //\r
-        Identifiable<NodeChildKey>, //\r
-        ChildOf<Node> {\r
-\r
-}\r
+package org.opendaylight.yangtools.yang.binding.test.mock;
+
+import org.opendaylight.yangtools.yang.binding.ChildOf;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.Identifiable;
+
+public interface NodeChild extends //
+        DataObject, //
+        Identifiable<NodeChildKey>, //
+        ChildOf<Node> {
+
+}
index d401304b6be2edffeaeb2bb1a8084e220fdf6fa9..f78427840ca1bd81fd231a3d144a5703fa7c7cdc 100644 (file)
@@ -5,43 +5,43 @@
  * 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.yang.binding.test.mock;\r
-\r
-import org.opendaylight.yangtools.yang.binding.Identifier;\r
-\r
-public class NodeChildKey implements //\r
-        Identifier<NodeChild> {\r
-\r
-    private final int id;\r
-\r
-    public NodeChildKey(int id) {\r
-        super();\r
-        this.id = id;\r
-    }\r
-\r
-    public int getId() {\r
-        return id;\r
-    }\r
-\r
-    @Override\r
-    public int hashCode() {\r
-        final int prime = 31;\r
-        int result = 1;\r
-        result = prime * result + id;\r
-        return result;\r
-    }\r
-\r
-    @Override\r
-    public boolean equals(Object obj) {\r
-        if (this == obj)\r
-            return true;\r
-        if (obj == null)\r
-            return false;\r
-        if (getClass() != obj.getClass())\r
-            return false;\r
-        NodeChildKey other = (NodeChildKey) obj;\r
-        if (id != other.id)\r
-            return false;\r
-        return true;\r
-    }\r
-}\r
+package org.opendaylight.yangtools.yang.binding.test.mock;
+
+import org.opendaylight.yangtools.yang.binding.Identifier;
+
+public class NodeChildKey implements //
+        Identifier<NodeChild> {
+
+    private final int id;
+
+    public NodeChildKey(int id) {
+        super();
+        this.id = id;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + id;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        NodeChildKey other = (NodeChildKey) obj;
+        if (id != other.id)
+            return false;
+        return true;
+    }
+}
index bdfc59e2783475372b2a3ab7258af56a42122c38..295b6e5765628047e899ae528d881ce445ab23b3 100644 (file)
@@ -5,43 +5,43 @@
  * 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.yang.binding.test.mock;\r
-\r
-import org.opendaylight.yangtools.yang.binding.Identifier;\r
-\r
-public class NodeKey implements //\r
-        Identifier<Node> {\r
-\r
-    private final int id;\r
-\r
-    public NodeKey(int id) {\r
-        super();\r
-        this.id = id;\r
-    }\r
-\r
-    public int getId() {\r
-        return id;\r
-    }\r
-\r
-    @Override\r
-    public int hashCode() {\r
-        final int prime = 31;\r
-        int result = 1;\r
-        result = prime * result + id;\r
-        return result;\r
-    }\r
-\r
-    @Override\r
-    public boolean equals(Object obj) {\r
-        if (this == obj)\r
-            return true;\r
-        if (obj == null)\r
-            return false;\r
-        if (getClass() != obj.getClass())\r
-            return false;\r
-        NodeKey other = (NodeKey) obj;\r
-        if (id != other.id)\r
-            return false;\r
-        return true;\r
-    }\r
-}\r
+package org.opendaylight.yangtools.yang.binding.test.mock;
+
+import org.opendaylight.yangtools.yang.binding.Identifier;
+
+public class NodeKey implements //
+        Identifier<Node> {
+
+    private final int id;
+
+    public NodeKey(int id) {
+        super();
+        this.id = id;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + id;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        NodeKey other = (NodeKey) obj;
+        if (id != other.id)
+            return false;
+        return true;
+    }
+}
index cafcbcb434f366b72adbaf519a3483de34e13063..1bf7e18cd6c5ef4ce0f4710915d11de378ecc5f7 100644 (file)
@@ -5,14 +5,14 @@
  * 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.yang.binding.test.mock;\r
-\r
-import org.opendaylight.yangtools.yang.binding.ChildOf;\r
-import org.opendaylight.yangtools.yang.binding.DataObject;\r
-import org.opendaylight.yangtools.yang.binding.DataRoot;\r
-\r
-public interface Nodes extends //\r
-        ChildOf<DataRoot>, //\r
-        DataObject {\r
-\r
-}\r
+package org.opendaylight.yangtools.yang.binding.test.mock;
+
+import org.opendaylight.yangtools.yang.binding.ChildOf;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.DataRoot;
+
+public interface Nodes extends //
+        ChildOf<DataRoot>, //
+        DataObject {
+
+}