DataMap datamap = session.getDataMap(mapping,null);
datamap.opentag(job,"job");
datamap.readDO(job, "job");
Case c = job.getCase();
datamap.opentag(c,"case");
datamap.readDO(c,"case");
for(Client client : c.getClients()){
datamap.opentag(client,"client");
datamap.readDO(client,"client");
for(Income income : client.getIncomes()){
datamap.readDO(income,"income");
}
datamap.closetag();
}
for(Relationship r : c.getRelationships()){
datamap.opentag("relationship");
datamap.printdata("type", r.getType());
datamap.readDO(r.getSource(), "source");
datamap.readDO(r.getTarget(), "target");
datamap.closetag();