<commit_before>/*
 * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
 *
 * Copyright 2008-2013 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.plugin.printing.client.widget;

import org.geomajas.configuration.client.ClientRasterLayerInfo;
import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo;
import org.geomajas.plugin.rasterizing.command.dto.RasterLayerRasterizingInfo;
import org.geomajas.puregwt.client.map.MapPresenter;
import org.geomajas.puregwt.client.map.layer.Layer;
import org.geomajas.puregwt.client.map.layer.RasterServerLayer;

/**
 * {@link PrintableLayerBuilder} for {@link RasterServerLayer} instances.
 * 
 * @author <NAME>
 * 
 */
public class RasterServerLayerBuilder implements PrintableLayerBuilder {

	@Override
	public void build(MapRasterizingInfo mapRasterizingInfo, MapPresenter mapPresenter, Layer layer) {
		if (layer instanceof RasterServerLayer) {
			RasterServerLayer rasterServerLayer = (RasterServerLayer) layer;
			ClientRasterLayerInfo layerInfo = (ClientRasterLayerInfo) rasterServerLayer.getLayerInfo();
			RasterLayerRasterizingInfo rasterInfo = new RasterLayerRasterizingInfo();
			rasterInfo.setShowing(rasterServerLayer.isShowing());
			rasterInfo.setCssStyle(rasterServerLayer.getOpacity() + "");
			layerInfo.getWidgetInfo().put(RasterLayerRasterizingInfo.WIDGET_KEY, rasterInfo);
		}
	}

}<commit_msg>SPRINT-56: using rasterization throughout<commit_after>/*
 * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
 *
 * Copyright 2008-2013 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.plugin.printing.client.widget;

import org.geomajas.configuration.client.ClientLayerInfo;
import org.geomajas.configuration.client.ClientRasterLayerInfo;
import org.geomajas.plugin.rasterizing.command.dto.RasterLayerRasterizingInfo;
import org.geomajas.puregwt.client.map.MapPresenter;
import org.geomajas.puregwt.client.map.layer.Layer;
import org.geomajas.puregwt.client.map.layer.RasterServerLayer;

/**
 * {@link PrintableLayerBuilder} for {@link RasterServerLayer} instances.
 * 
 * @author <NAME>
 * 
 */
public class RasterServerLayerBuilder implements PrintableLayerBuilder {

	@Override
	public ClientLayerInfo build(MapPresenter mapPresenter, Layer layer) {
		RasterServerLayer rasterServerLayer = (RasterServerLayer) layer;
		ClientRasterLayerInfo layerInfo = (ClientRasterLayerInfo) rasterServerLayer.getLayerInfo();
		RasterLayerRasterizingInfo rasterInfo = new RasterLayerRasterizingInfo();
		rasterInfo.setShowing(rasterServerLayer.isShowing());
		rasterInfo.setCssStyle(rasterServerLayer.getOpacity() + "");
		layerInfo.getWidgetInfo().put(RasterLayerRasterizingInfo.WIDGET_KEY, rasterInfo);
		return layerInfo;
	}

	@Override
	public boolean supports(Layer layer) {
		return layer instanceof RasterServerLayer;
	}

}
{'fraction_non_alphanumeric': 0.0928592418454305, 'fraction_numerical': 0.005289450484866294, 'mean_word_length': 5.780876494023905, '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': '5331834', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1032, 'n_words': 228}