writeObject(writer, context, "kbase", kBaseModule);
}
}
public Object unmarshal(HierarchicalStreamReader reader, final UnmarshallingContext context) {
final KModuleModel kModule = new KModuleModel();
readNodes(reader, new AbstractXStreamConverter.NodeReader() {
public void onNode(HierarchicalStreamReader reader, String name, String value) {
if ("kbase".equals(name)) {
KBaseModel kBaseModule = readObject(reader, context, KBaseModel.class);
kModule.getKBases().put(kBaseModule.getName(), kBaseModule);
}
}
});
return kModule;