<commit_before>package nl.avansc1.facturatie.api.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * This controller is responsible for importing declarations
 *
 * @author <NAME>
 */
@RequestMapping("/import")
@Controller
public class ImportController {

}<commit_msg>Add working controller. XML IMPORTER DONE not tested yet<commit_after>package nl.avansc1.facturatie.api.controller;

import nl.avansc1.facturatie.api.service.Import;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.xml.sax.SAXException;

import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException;

/**
 * This controller is responsible for importing declarations
 *
 * @author <NAME>
 */
@RequestMapping("/import")
@Controller
public class ImportController {
    @RequestMapping("/")
    public String importRoute() throws ParserConfigurationException, SAXException, IOException {
        Import xml = Import.importWithTestFile("treatments.xml");
        xml.start();
        return "Import succesfully completed";
    }
}
{'fraction_non_alphanumeric': 0.10324232081911262, 'fraction_numerical': 0.002559726962457338, 'mean_word_length': 5.306451612903226, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, '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': '7254086', 'n_tokens_mistral': 321, 'n_tokens_neox': 317, 'n_words': 72}