<commit_before>package org.skyve.impl.metadata.repository;

import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;

import javax.xml.bind.annotation.adapters.XmlAdapter;

/**
 * JAXB Adapter for Map<String, String> to/from PropertyMapType.
 */
public class PropertyMapAdapter extends XmlAdapter<PropertyMapType, Map<String, String>> {
	@Override
	public Map<String, String> unmarshal(PropertyMapType v) throws Exception {
		Map<String, String> result = new TreeMap<>();
		for (PropertyMapEntryType property : v.properties) {
			result.put(property.key, property.value);
		}
		return result;
	}

	@Override
	public PropertyMapType marshal(Map<String, String> v) throws Exception {
		PropertyMapType result = new PropertyMapType();

		List<PropertyMapEntryType> properties = result.properties;
		for (Entry<String, String> entry : v.entrySet()) {
			PropertyMapEntryType property = new PropertyMapEntryType();
			property.key = entry.getKey();
			property.value = entry.getValue();
			properties.add(property);
		}

		return result;
	}
}<commit_msg>Stop property elements being generated on DecoratedMetaData classes when generating edit views.<commit_after>package org.skyve.impl.metadata.repository;

import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;

import javax.xml.bind.annotation.adapters.XmlAdapter;

/**
 * JAXB Adapter for Map<String, String> to/from PropertyMapType.
 */
public class PropertyMapAdapter extends XmlAdapter<PropertyMapType, Map<String, String>> {
	@Override
	public Map<String, String> unmarshal(PropertyMapType v) throws Exception {
		Map<String, String> result = new TreeMap<>();
		for (PropertyMapEntryType property : v.properties) {
			result.put(property.key, property.value);
		}
		return result;
	}

	@Override
	public PropertyMapType marshal(Map<String, String> v) throws Exception {
		PropertyMapType result = null;
		if (! v.isEmpty()) {
			result = new PropertyMapType();
			List<PropertyMapEntryType> properties = result.properties;
			for (Entry<String, String> entry : v.entrySet()) {
				PropertyMapEntryType property = new PropertyMapEntryType();
				property.key = entry.getKey();
				property.value = entry.getValue();
				properties.add(property);
			}
		}
		
		return result;
	}
}
{'fraction_non_alphanumeric': 0.11350884764782046, 'fraction_numerical': 0.0, 'mean_word_length': 4.89821882951654, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '2563369', 'n_tokens_mistral': 739, 'n_tokens_neox': 678, 'n_words': 171}