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

    @Override
    public Map<String, ClientReferenceableFile> unmarshal(ClientReportUnitResourceListWrapper v) throws Exception {
        Map<String, ClientReferenceableFile> result = null;
        if(v != null && v.getFiles() != null){
            result = new HashMap<String, ClientReferenceableFile>();
            for(ClientReportUnitResource currentResource : v.getFiles()){
                result.put(currentResource.getName(), currentResource.getFile());
            }
        }
        return result;
    }

}