Fix checkstyle in mdsal-binding2-dom-codec
[mdsal.git] / binding2 / mdsal-binding2-dom-codec / src / main / java / org / opendaylight / mdsal / binding / javav2 / dom / codec / api / BindingTreeCodec.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.javav2.dom.codec.api;
9
10 import com.google.common.annotations.Beta;
11 import javax.annotation.Nullable;
12 import org.opendaylight.mdsal.binding.javav2.spec.base.InstanceIdentifier;
13 import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
15 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
16
17 /**
18  * Navigable tree representing hierarchy of Binding to Normalized Node codecs.
19  *
20  * <p>
21  * This navigable tree is associated to concrete set of YANG models, represented
22  * by SchemaContext and provides access to subtree specific serialization
23  * context.
24  */
25 @Beta
26 public interface BindingTreeCodec {
27
28     /**
29      * Get specific subtree serialization context by Binding path.
30      *
31      * @param path
32      *            - {@link InstanceIdentifier} path
33      * @param <T> data type
34      * @return subtree codec
35      */
36     @Nullable
37     <T extends TreeNode> BindingTreeNodeCodec<T> getSubtreeCodec(InstanceIdentifier<T> path);
38
39     /**
40      * Get specific subtree serialization context by DOM path.
41      *
42      * @param path
43      *            - {@link YangInstanceIdentifier} path
44      * @return subtree codec
45      */
46     @Nullable
47     BindingTreeNodeCodec<?> getSubtreeCodec(YangInstanceIdentifier path);
48
49     /**
50      * Get specific subtree serialization context by {@link SchemaPath} path.
51      *
52      * @param path
53      *            - {@link SchemaPath} path
54      * @return specific subtree codec
55      */
56     @Nullable
57     BindingTreeNodeCodec<?> getSubtreeCodec(SchemaPath path);
58
59 }