test_class.declarator: dispatcher
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private CommandDispatcher dispatcher;
test_class.type: CommandDispatcher
test_class.var_name: dispatcher
test_class.declarator: geometries
test_class.modifier: private
test_class.original_string: private List<Geometry> geometries;
test_class.type: List<Geometry>
test_class.var_name: geometries
test_class.file: command/src/test/java/org/geomajas/command/geometry/GeometryBufferCommandTest.java
test_class.identifier: GeometryBufferCommandTest
test_case.body: @Test
  	public void bufferZeroTest() throws GeomajasException {
  		GeometryBufferRequest request = new GeometryBufferRequest();
  		request.setGeometries(geometries);
  		request.setBufferDistance(0);
  		GeometryBufferResponse response = (GeometryBufferResponse) dispatcher.execute(
  				GeometryBufferRequest.COMMAND, request, null, "en");
  		List<Geometry> buffered = response.getGeometries();
  		Assert.assertEquals(3, buffered.size());
  		Assert.assertTrue(buffered.get(0).getGeometries()[0].getCoordinates().length == 4);
  		Assert.assertTrue(buffered.get(1).getGeometryType().equals(Geometry.POLYGON));
  		Assert.assertTrue(buffered.get(1).getCoordinates() == null);
  		Assert.assertTrue(buffered.get(2).getGeometryType().equals(Geometry.POLYGON));
  		Assert.assertTrue(buffered.get(2).getCoordinates() == null);
  	}
test_case.class_method_signature: GeometryBufferCommandTest.bufferZeroTest()
test_case.full_signature: @Test public void bufferZeroTest()
test_case.identifier: bufferZeroTest
test_case.invocations: setGeometries setBufferDistance execute getGeometries assertEquals size assertTrue getCoordinates getGeometries get assertTrue equals getGeometryType get assertTrue getCoordinates get assertTrue equals getGeometryType get assertTrue getCoordinates get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void bufferZeroTest()
focal_class.declarator: converter
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private DtoConverterService converter;
focal_class.type: DtoConverterService
focal_class.var_name: converter
focal_class.file: command/src/main/java/org/geomajas/command/geometry/GeometryBufferCommand.java
focal_class.identifier: GeometryBufferCommand
focal_class.interfaces: implements CommandHasRequest<GeometryBufferRequest, GeometryBufferResponse>
focal_class.class_method_signature: GeometryBufferCommand.getEmptyCommandRequest()
focal_class.full_signature: @Override public GeometryBufferRequest getEmptyCommandRequest()
focal_class.identifier: getEmptyCommandRequest
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: GeometryBufferRequest
focal_class.signature: GeometryBufferRequest getEmptyCommandRequest()
focal_class.class_method_signature: GeometryBufferCommand.getEmptyCommandResponse()
focal_class.full_signature: @Override public GeometryBufferResponse getEmptyCommandResponse()
focal_class.identifier: getEmptyCommandResponse
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: GeometryBufferResponse
focal_class.signature: GeometryBufferResponse getEmptyCommandResponse()
focal_class.class_method_signature: GeometryBufferCommand.execute(GeometryBufferRequest request, GeometryBufferResponse response)
focal_class.full_signature: @Override public void execute(GeometryBufferRequest request, GeometryBufferResponse response)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (GeometryBufferRequest request, GeometryBufferResponse response)
focal_class.return: void
focal_class.signature: void execute(GeometryBufferRequest request, GeometryBufferResponse response)
focal_method.body: @Override
  	public void execute(GeometryBufferRequest request, GeometryBufferResponse response) throws Exception {
  		List<org.geomajas.geometry.Geometry> clientGeometries = request.getGeometries();
  		if (clientGeometries == null || clientGeometries.size() == 0) {
  			throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "request");
  		}
  
  		// Convert to internal, apply buffer and convert back to DTO
  		List<org.geomajas.geometry.Geometry> result = new ArrayList<org.geomajas.geometry.Geometry>();
  		double buffer = request.getBufferDistance();
  		int quadrantSegments = request.getQuadrantSegments();
  		for (Geometry clientGeometry : clientGeometries) {
  			result.add(converter.toDto(converter.toInternal(clientGeometry).buffer(buffer, quadrantSegments)));
  		}
  		response.setGeometries(result);
  	}
focal_method.class_method_signature: GeometryBufferCommand.execute(GeometryBufferRequest request, GeometryBufferResponse response)
focal_method.full_signature: @Override public void execute(GeometryBufferRequest request, GeometryBufferResponse response)
focal_method.identifier: execute
focal_method.invocations: getGeometries size getBufferDistance getQuadrantSegments add toDto buffer toInternal setGeometries
focal_method.modifiers: @Override public
focal_method.parameters: (GeometryBufferRequest request, GeometryBufferResponse response)
focal_method.return: void
focal_method.signature: void execute(GeometryBufferRequest request, GeometryBufferResponse response)