class FilesMapXmlAdapter extends XmlAdapter<ClientReportUnitResourceListWrapper, Map<String, ClientReferenceableFile>> {

    @Override
    public ClientReportUnitResourceListWrapper marshal(Map<String, ClientReferenceableFile> files) throws Exception {
        List<ClientReportUnitResource> result = null;
        if (files != null) {
            result = new ArrayList<ClientReportUnitResource>();
            for (String name : files.keySet()) {
                result.add(new ClientReportUnitResource(name, files.get(name)));
            }
        }
        return result== null ? null : new ClientReportUnitResourceListWrapper(result);
    }

}