@Beta public final class LeafNodeCodecContext<D extends TreeNode> extends NodeCodecContext<D>
NodeCodecContext.CodecContextFactory| Modifier and Type | Method and Description |
|---|---|
BindingTreeNodeCodec<?> |
bindingPathArgumentChild(TreeArgument<?> arg,
List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> builder)
Returns nested node context using supplied Binding Instance Identifier
and adds YANG instance identifiers to supplied list.
|
BindingNormalizedNodeCachingCodec<D> |
createCachingCodec(com.google.common.collect.ImmutableCollection<Class<? extends TreeNode>> cacheSpecifier)
Returns codec which uses caches serialization / deserialization results.
|
D |
deserialize(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> normalizedNode)
Converts from Normalized Node to Binding representation of data.
|
protected Object |
deserializeObject(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> normalizedNode) |
TreeArgument |
deserializePathArgument(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument arg)
Deserializes path argument for current node.
|
NodeCodecContext<?> |
get() |
Class<D> |
getBindingClass()
Returns binding class of interface which represents API of current schema
node.
|
org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument |
getDomPathArgument()
Returns Yang Instance Identifier Path Argument of current node
|
Method |
getGetter() |
org.opendaylight.yangtools.yang.model.api.DataSchemaNode |
getSchema()
Return schema of node codec context.
|
org.opendaylight.yangtools.concepts.Codec<Object,Object> |
getValueCodec() |
<E extends TreeNode> |
possibleStreamChild(Class<E> childClass)
Returns child context as if it was walked by
BindingStreamEventWriter. |
org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> |
serialize(D data)
Converts from Binding to Normalized Node representation of data.
|
org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument |
serializePathArgument(TreeArgument arg)
Serializes path argument for current node.
|
<E extends TreeNode> |
streamChild(Class<E> childClass)
Returns child context as if it was walked by
BindingStreamEventWriter. |
void |
writeAsNormalizedNode(D data,
org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter writer)
Writes data representing object to supplied stream.
|
BindingTreeNodeCodec<?> |
yangPathArgumentChild(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument child)
Returns nested node context using supplied YANG Instance Identifier.
|
addYangPathArgumentpublic org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument getDomPathArgument()
NodeCodecContextgetDomPathArgument in class NodeCodecContext<D extends TreeNode>@Nonnull public D deserialize(@Nonnull org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> normalizedNode)
BindingNormalizedNodeCodecdeserialize in interface BindingNormalizedNodeCodec<D extends TreeNode>normalizedNode - - Normalized Node representation of data@Nonnull public NodeCodecContext<?> get()
public final Method getGetter()
@Nonnull public BindingTreeNodeCodec<?> bindingPathArgumentChild(@Nonnull TreeArgument<?> arg, List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> builder)
BindingTreeNodeCodecbindingPathArgumentChild in interface BindingTreeNodeCodec<D extends TreeNode>arg - - Binding Instance Identifier Argumentbuilder - - mutable instance of list, which is appended by
YangInstanceIdentifiers as tree is walked, use null if such
side-product is not needed@Nonnull public BindingNormalizedNodeCachingCodec<D> createCachingCodec(@Nonnull com.google.common.collect.ImmutableCollection<Class<? extends TreeNode>> cacheSpecifier)
BindingTreeNodeCodeccreateCachingCodec in interface BindingTreeNodeCodec<D extends TreeNode>cacheSpecifier - - set of objects, for which cache may be in place@Nonnull public Class<D> getBindingClass()
BindingTreeNodeCodecgetBindingClass in interface BindingTreeNodeCodec<D extends TreeNode>@Nonnull public org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> serialize(@Nonnull D data)
BindingNormalizedNodeCodecserialize in interface BindingNormalizedNodeCodec<D extends TreeNode>data - - Binding representation of datapublic void writeAsNormalizedNode(D data, org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter writer)
BindingTreeNodeCodecwriteAsNormalizedNode in interface BindingTreeNodeCodec<D extends TreeNode>data - - representing objectwriter - - supplied stream@Nonnull public <E extends TreeNode> BindingTreeNodeCodec<E> streamChild(@Nonnull Class<E> childClass)
BindingTreeNodeCodecBindingStreamEventWriter. This means that to enter case, one must
issue getChild(ChoiceClass).getChild(CaseClass).streamChild in interface BindingTreeNodeCodec<D extends TreeNode>E - data typechildClass - - child class by Biding Stream navigationpublic <E extends TreeNode> com.google.common.base.Optional<? extends BindingTreeNodeCodec<E>> possibleStreamChild(@Nonnull Class<E> childClass)
BindingTreeNodeCodecBindingStreamEventWriter. This means that to enter case, one must
issue getChild(ChoiceClass).getChild(CaseClass).
This method differs from BindingTreeNodeCodec.streamChild(Class), that is less
stricter for interfaces representing augmentation and cases, that may
return BindingTreeNodeCodec even if augmentation interface
containing same data was supplied and does not represent augmentation of
this node.possibleStreamChild in interface BindingTreeNodeCodec<D extends TreeNode>E - data typechildClass - - child class by Binding Stream navigation@Nonnull public BindingTreeNodeCodec<?> yangPathArgumentChild(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument child)
BindingTreeNodeCodecyangPathArgumentChild in interface BindingTreeNodeCodec<D extends TreeNode>child - - Yang Instance Identifier Argumentprotected Object deserializeObject(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> normalizedNode)
deserializeObject in class NodeCodecContext<D extends TreeNode>public TreeArgument deserializePathArgument(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument arg)
BindingTreeNodeCodecdeserializePathArgument in interface BindingTreeNodeCodec<D extends TreeNode>arg - - Yang Path Argument, may be null if Yang Instance Identifier
does not have representation for current node (e.g. case)public org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument serializePathArgument(TreeArgument arg)
BindingTreeNodeCodecserializePathArgument in interface BindingTreeNodeCodec<D extends TreeNode>arg - - Binding Path Argument, may be null if Binding Instance
Identifier does not have representation for current node (e.g.
choice or case)@Nonnull public org.opendaylight.yangtools.yang.model.api.DataSchemaNode getSchema()
BindingTreeNodeCodecgetSchema in interface BindingTreeNodeCodec<D extends TreeNode>Object as schema of specific node contextCopyright © 2018 OpenDaylight. All rights reserved.