public void convert(String type, String code, String[] options, File file, boolean kirjKoodTied) throws IOException {
        if (kirjKoodTied) {
            PrintWriter IDOut = new PrintWriter(new FileWriter(IDfile, true));
            IDOut.println(code);
            IDOut.close();
        }
        
        for (int i = 0; i < options.length; i++) {
            options[i] = replaceAUmlautAndOUmlaut(options[i]);
        }

        if (type.equals("inproceedings")) {
            testi = "inproceedings";
            convertInproceedings(code, options, file);
        }

        if (type.equals("book")) {
            testi = "book";
            convertBook(code, options, file);
        }

        if (type.equals("article")) {
            testi = "article";
            convertArticle(code, options, file);
        }
    }