public class DefaultXmlCodec extends Object implements YangDataTreeCodec
| Constructor and Description |
|---|
DefaultXmlCodec()
Creates a new YANG xml codec.
|
| Modifier and Type | Method and Description |
|---|---|
YdtBuilder |
decodeCompositeProtocolDataToYdt(YangCompositeEncoding protoData,
Object schemaReg,
YmsOperationType opType)
When YMS decode composite protocol operation request it uses the
registered decode method to translate the protocol data into a
abstract YANG data tree.
|
YdtBuilder |
decodeProtocolDataToYdt(String protoData,
Object schemaReg,
YmsOperationType opType)
When YMS decode simple protocol operation request it uses the
registered decode method to translate the protocol data into a
abstract YANG data tree.
|
YangCompositeEncoding |
encodeYdtToCompositeProtocolFormat(YdtBuilder ydtBuilder)
When the YMS need to encode composite protocol operation request, it
will translate the YANG objects into an abstract YANG data
tree and invoke this registered encode method.
|
String |
encodeYdtToProtocolFormat(YdtBuilder ydtBuilder)
When the YMS need to encode simple protocol operation request,
it will translate the YANG objects into an abstract YANG data tree and
invoke this registered encode method.
|
public String encodeYdtToProtocolFormat(YdtBuilder ydtBuilder)
YangDataTreeCodecencodeYdtToProtocolFormat in interface YangDataTreeCodecydtBuilder - Abstract YANG data tree contains the operation
requestpublic YangCompositeEncoding encodeYdtToCompositeProtocolFormat(YdtBuilder ydtBuilder)
YangDataTreeCodecThe Initial chain of node in the YDT will have the operation type set to NONE to specify it is a resource identifier. The Resource information is maintained as a subtree to the resource identifier node.
encodeYdtToCompositeProtocolFormat in interface YangDataTreeCodecydtBuilder - Abstract YANG data tree contains the operation
requestpublic YdtBuilder decodeCompositeProtocolDataToYdt(YangCompositeEncoding protoData, Object schemaReg, YmsOperationType opType)
YangDataTreeCodecThe CODEC implementation are unaware of the schema against which they are performing the codec operation, so YMS will send the schema registry on which the YANG data tree needs to operate, so the code implementation needs to pass this schema registry to the get a YDT builder.
decodeCompositeProtocolDataToYdt in interface YangDataTreeCodecprotoData - composite input string containing the
protocol data which needs to be decodedschemaReg - Schema registry based on which the YANG
data tree will be builtopType - protocol operation being performedpublic YdtBuilder decodeProtocolDataToYdt(String protoData, Object schemaReg, YmsOperationType opType)
YangDataTreeCodecThe CODEC implementation are unaware of the schema against which they are performing the codec operation, so YMS will send the schema registry on which the YANG data tree needs to operate, so the code implementation needs to pass this schema registry to the get a YDT builder.
decodeProtocolDataToYdt in interface YangDataTreeCodecprotoData - input string containing the simple
protocol data which needs to be decodedschemaReg - Schema registry based on which the YANG
data tree will be builtopType - protocol operation being performed