@Override
    public void run() {
        Citation c;

        io.println("Please enter citation type. "
                + "Supported types are \"book\", \"article\", \"inproceedings\" and \"misc\".");

        while (true) {
            String command = io.getString("> ");

            BaseCitationGenerator citationGenerator;

            if (command == null) {
                io.println("Please enter citation type.");
                continue;
            } else if (command.equalsIgnoreCase("book")) {
                citationGenerator = new BookCitationGenerator(io, citations);
            } else if (command.equalsIgnoreCase("article")) {
                citationGenerator = new ArticleCitationGenerator(io, citations);
            } else if (command.equalsIgnoreCase("inproceedings")) {
                citationGenerator = new InproceedingsCitationGenerator(io, citations);
            } else if (command.equalsIgnoreCase("misc")) {
                citationGenerator = new MiscCitationGenerator(io, citations);
            } else {
                io.println("Citation type not found!");
                continue;
            }
            citationGenerator.run();
            c = citationGenerator.getCitation();

            break;
        }

        citations.addCitation(c);
        io.println("Citation added!");
    }