Actually, the ElementCenter platform from CenteredLogic deals with this as part of the Netconf infrastructure.
It takes in a Yang/Yin model and converts it into a canonical internal model as well as creates the mappings required
for transforming between POJOs and Netconf .(in fact, it generates the Java code for the POJOs from the model itself).
However, ElementCenter is a pretty comprehensive product (it provides the basis for a complete EMS/NMS) and
is only available with a commercial license.
Regards.
A.V.