Bump to odlparent-9.0.0/yangtools-7.0.1-SNAPSHOT
[mdsal.git] / binding / mdsal-binding-dom-codec-api / src / main / java / org / opendaylight / mdsal / binding / dom / codec / api / BindingNormalizedNodeCodec.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.binding.dom.codec.api;
9
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.yang.binding.BindingObject;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
14
15 /**
16  * Codec providing serialization and deserializiation between Binding and NormalizedNode representation of data.
17  *
18  * @param <T> Binding representation of data
19  */
20 @Beta
21 public interface BindingNormalizedNodeCodec<T extends BindingObject> {
22     /**
23      * Converts from Normalized Node to Binding representation of data.
24      *
25      * @param data Normalized Node representation of data
26      * @return Binding representation of data
27      */
28     @NonNull T deserialize(@NonNull NormalizedNode data);
29
30     /**
31      * Converts from  Binding to Normalized Node representation of data.
32      *
33      * @param data Binding representation of data
34      * @return Normalized Node representation of data
35      */
36     @NonNull NormalizedNode serialize(@NonNull T data);
37 }