- NodeToNormalizedNodeBuilder currentOp = NodeToNormalizedNodeBuilder.from(ctx);
-
- for(YangInstanceIdentifier.PathArgument pathArgument : id.getPathArguments()){
- currentOp = currentOp.getChild(pathArgument);
- }
-
- QName nodeType = null;
-
- if(id.getPath().size() < 1){
- nodeType = null;
- } else {
- final YangInstanceIdentifier.PathArgument pathArgument = id.getPath().get(id.getPath().size() - 1);
- if(pathArgument instanceof YangInstanceIdentifier.AugmentationIdentifier){
- nodeType = null;
- } else {
- nodeType = pathArgument.getNodeType();
- }
- }
- if((node != null)&& (!node.getType().isEmpty())){
- return currentOp.normalize(nodeType, node);
- } else{
- return null;
- }
+ if(node.getIntType() < 0 || node.getSerializedSize() == 0){
+ return null;
+ }
+ return NormalizedNodeSerializer.deSerialize(node);