25e5ed54c7c8b20eaff1081559e60679817d2d19
[mdsal.git] / binding / mdsal-binding-dom-codec-api / src / main / java / org / opendaylight / mdsal / binding / dom / codec / api / BindingCodecTree.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.eclipse.jdt.annotation.Nullable;
13 import org.opendaylight.yangtools.yang.binding.DataObject;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
15 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
16 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
17
18 /**
19  * Navigable tree representing hierarchy of Binding to Normalized Node codecs. This navigable tree is associated to
20  * a concrete set of YANG models, represented by SchemaContext and provides access to subtree specific serialization
21  * context.
22  */
23 // TODO: Add more detailed documentation
24 public interface BindingCodecTree {
25
26     @Nullable <T extends DataObject> BindingDataObjectCodecTreeNode<T> getSubtreeCodec(InstanceIdentifier<T> path);
27
28     @Nullable BindingCodecTreeNode getSubtreeCodec(YangInstanceIdentifier path);
29
30     @Nullable BindingCodecTreeNode getSubtreeCodec(Absolute path);
31
32     /**
33      * Get the {@link BindingIdentityCodec} associated with this tree.
34      *
35      * @return A BindingIdentityCodec instance.
36      */
37     @Beta
38     @NonNull BindingIdentityCodec getIdentityCodec();
39
40     /**
41      * Get the {@link BindingInstanceIdentifierCodec} associated with this tree.
42      *
43      * @return A BindingInstanceIdentifierCodec instance.
44      */
45     @Beta
46     @NonNull BindingInstanceIdentifierCodec getInstanceIdentifierCodec();
47 }