2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.binding.data.codec.api;
10 import com.google.common.annotations.Beta;
11 import javax.annotation.Nonnull;
12 import org.opendaylight.yangtools.yang.binding.DataObject;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
17 * Codec providing serialization and deserializiation between Binding
18 * and NormalizedNode representation of data.
21 * @param <T> Binding representation of data
24 public interface BindingNormalizedNodeCodec<T extends DataObject> {
27 * Converts from Normalized Node to Binding representation of data.
29 * @param data Normalized Node representation of data
30 * @return Binding representation of data
32 @Nonnull T deserialize(@Nonnull NormalizedNode<?,?> data);
35 * Converts from Binding to Normalized Node representation of data.
37 * @param data Binding representation of data
38 * @return Normalized Node representation of data
40 @Nonnull NormalizedNode<?,?> serialize(@Nonnull T data);