<commit_before>package ca.corefacility.bioinformatics.irida.web.assembler.resource.sample;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import ca.corefacility.bioinformatics.irida.model.IridaResourceSupport;
import ca.corefacility.bioinformatics.irida.model.sample.MetadataTemplateField;
import ca.corefacility.bioinformatics.irida.model.sample.metadata.MetadataEntry;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Response class for grouping {@link MetadataEntry}s for response in the REST API
 */
public class SampleMetadataResponse extends IridaResourceSupport {
	Map<MetadataTemplateField, MetadataEntry> metadata;

	@Deprecated
	public SampleMetadataResponse(Map<MetadataTemplateField, MetadataEntry> metadata) {
		this.metadata = metadata;
	}

	public SampleMetadataResponse(Set<MetadataEntry> metadataEntrySet) {
		metadata = new HashMap<>();
		for (MetadataEntry entry : metadataEntrySet) {<commit_msg>removed deprecated constructor.  not sure why it was sitll there<commit_after>package ca.corefacility.bioinformatics.irida.web.assembler.resource.sample;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import ca.corefacility.bioinformatics.irida.model.IridaResourceSupport;
import ca.corefacility.bioinformatics.irida.model.sample.MetadataTemplateField;
import ca.corefacility.bioinformatics.irida.model.sample.metadata.MetadataEntry;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Response class for grouping {@link MetadataEntry}s for response in the REST API
 */
public class SampleMetadataResponse extends IridaResourceSupport {
	Map<MetadataTemplateField, MetadataEntry> metadata;

	public SampleMetadataResponse(Set<MetadataEntry> metadataEntrySet) {
		metadata = new HashMap<>();
		for (MetadataEntry entry : metadataEntrySet) {
{'fraction_non_alphanumeric': 0.08857299070530344, 'fraction_numerical': 0.0, 'mean_word_length': 6.787234042553192, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6546933', 'n_tokens_mistral': 530, 'n_tokens_neox': 498, 'n_words': 108}