<commit_before>/*
 * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
 *
 * Copyright 2008-2011 Geosparc nv, http://www.geosparc.com/, Belgium.
 *
 * The program is available in open source according to the GNU Affero
 * General Public License. All contributions in this program are covered
 * by the Geomajas Contributors License Agreement. For full licensing
 * details, see LICENSE.txt in the project root.
 */
package org.geomajas.layer.entity;

import java.util.Map;

import org.geomajas.configuration.FeatureInfo;
import org.geomajas.layer.LayerException;
import org.geomajas.layer.feature.Attribute;

/**
 * Service that merges a map of attributes with a feature or association attribute object. The
 * {@link #setAttributes(Object, FeatureInfo, EntityMapper, Map)} operation makes use of a custom {@link EntityMapper}
 * that has be implemented by each layer that wants to make use of this service. The service also provides a
 * {@link #getAttribute(Object, FeatureInfo, EntityMapper, String)} method to recursively extract attributes.
 * 
 * @author <NAME>
 * @since 1.9.0
 * 
 */
public interface EntityAttributeService {

	/**
	 * Merges the specified attribute map with this layer object. This means that the complete attribute graph is merged
	 * into the object's entity graph, overriding existing attributes where applicable and creating new ones as well.
	 * The resulting objects should be ready to pass to the layer for persistence.
	 * <commit_msg>GBE-191: added EntityAttributeService to api<commit_after>/*
 * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
 *
 * Copyright 2008-2011 Geosparc nv, http://www.geosparc.com/, Belgium.
 *
 * The program is available in open source according to the GNU Affero
 * General Public License. All contributions in this program are covered
 * by the Geomajas Contributors License Agreement. For full licensing
 * details, see LICENSE.txt in the project root.
 */
package org.geomajas.layer.entity;

import java.util.Map;

import org.geomajas.configuration.FeatureInfo;
import org.geomajas.global.Api;
import org.geomajas.layer.LayerException;
import org.geomajas.layer.feature.Attribute;

/**
 * Service that merges a map of attributes with a feature or association attribute object. The
 * {@link #setAttributes(Object, FeatureInfo, EntityMapper, Map)} operation makes use of a custom {@link EntityMapper}
 * that has be implemented by each layer that wants to make use of this service. The service also provides a
 * {@link #getAttribute(Object, FeatureInfo, EntityMapper, String)} method to recursively extract attributes.
 * 
 * @author <NAME>
 * @since 1.9.0
 * 
 */
@Api(allMethods = true)
public interface EntityAttributeService {

	/**
	 * Merges the specified attribute map with this layer object. This means that the complete attribute graph is merged
	 * into the object's entity graph, overriding existing attributes where applicable and creating new ones as well.
	 * The resulting objects should be ready to pass to the layer for persistence.
	 * 
{'fraction_non_alphanumeric': 0.07835455435847209, 'fraction_numerical': 0.008161932745674175, 'mean_word_length': 4.356643356643357, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, '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': '1119270', 'n_tokens_mistral': 838, 'n_tokens_neox': 784, 'n_words': 360}