<commit_before>package de.hs_mainz.BOS.Overpass_API;

import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import de.hs_mainz.BOS.Controller.OverpassAPI;
import de.hs_mainz.BOS.Model.Place;
import de.hs_mainz.BOS.Model.BOS;

@Path("Overpass_API")

public class RequestHandler {

	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public String get(@QueryParam("callback") String callback, @QueryParam("interest") String interest, @QueryParam("south") String south, @QueryParam("west") String west, @QueryParam("north") String north, @QueryParam("east") String east) throws NumberFormatException, UnsupportedEncodingException {
		System.out.println(callback);
		System.out.println(interest);
		System.out.println(south);
		System.out.println(west);
		System.out.println(north);
		System.out.println(east);
		
		//ArrayList<Place> allBOS = getRelevantBOS("fire_station",45.0,8.0,50.0,9.0);
		
		ArrayList<Place> allBOS = getRelevantBOS(interest, Double.parseDouble(south), Double.parseDouble(west), Double.parseDouble(north), Double.parseDouble(east));
		ResponseHandler responseHandler = new ResponseHandler();
		String response = responseHandler.getResponse(allBOS);
		return response;
	}
	
	public String adCallback(String callback, String response) {
		if(callback.isEmpty() || callback == null)
			return response;
		else
			return callback + "'" + response + "'";
	}
	
	public ArrayList<Place> getRelevantBOS(String interest, Double south, Double west, Double north, Double east) throws UnsupportedEncodingException {
		BOS bos = new BOS();
		bos.setInterest(interest);
		bos.setSouth(south);
		bos.setWest(west);
		bos.setNorth(north);
		bos.setEast(east);
		
		OverpassAPI OverpassAPI = new OverpassAPI();
		
		ArrayList<Place> allBOS = OverpassAPI.search(interest, bos);
		return allBOS;
	}
	
}
<commit_msg>bearbeitung caro<commit_after>package de.hs_mainz.BOS.Overpass_API;

import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import de.hs_mainz.BOS.Controller.OverpassAPI;
import de.hs_mainz.BOS.Model.Place;
import de.hs_mainz.BOS.Model.BOS;

@Path("Overpass_API")

public class RequestHandler {

	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public String get(@QueryParam("callback") String callback, @QueryParam("interest") String interest, @QueryParam("south") String south, @QueryParam("west") String west, @QueryParam("north") String north, @QueryParam("east") String east) throws NumberFormatException, UnsupportedEncodingException {
		System.out.println(callback);
		System.out.println(interest);
		System.out.println(south);
		System.out.println(west);
		System.out.println(north);
		System.out.println(east);
		
		//ArrayList<Place> allBOS = getRelevantBOS("fire_station",45.0,8.0,50.0,9.0);
		
		ArrayList<Place> allBOS = getRelevantBOS(interest, Double.parseDouble(south), Double.parseDouble(west), Double.parseDouble(north), Double.parseDouble(east));
		ResponseHandler responseHandler = new ResponseHandler();
		String response = responseHandler.getResponse(allBOS);
		return adCallback(callback, response);
	}
	
	public String adCallback(String callback, String response) {
		if(callback.isEmpty() || callback == null)
			return response;
		else
			return callback + "'" + response + "'";
	}
	
	public ArrayList<Place> getRelevantBOS(String interest, Double south, Double west, Double north, Double east) throws UnsupportedEncodingException {
		BOS bos = new BOS();
		bos.setInterest(interest);
		bos.setSouth(south);
		bos.setWest(west);
		bos.setNorth(north);
		bos.setEast(east);
		
		OverpassAPI OverpassAPI = new OverpassAPI();
		
		ArrayList<Place> allBOS = OverpassAPI.search(interest, bos);
		return allBOS;
	}
	
}

{'fraction_non_alphanumeric': 0.12460220318237454, 'fraction_numerical': 0.004895960832313341, 'mean_word_length': 4.828815977175464, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1567704', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1284, 'n_words': 250}