class OutputFormatXmlAdapter extends XmlAdapter<ClientReportJobOutputFormatsWrapper, Set<OutputFormat>> {

    @Override
    public ClientReportJobOutputFormatsWrapper marshal(Set<OutputFormat> v) throws Exception {
        ClientReportJobOutputFormatsWrapper result = null;
        if (v != null && !v.isEmpty()) {
            Set<String> set = new HashSet<String>();
            for (OutputFormat currentValue : v) {
                String currentStringValue = currentValue.name();
                set.add(currentStringValue);
            }
            result = new ClientReportJobOutputFormatsWrapper();
            result.setFormats(set);
        }
        return result;
    }

}