public List<String> process(String query) throws IncorrectQueryException {
            StringReader reader = new StringReader(query);
            String sqlQuery = "";

            String next = nextTerm(reader);
            int count = 0;
            while (!next.isEmpty()) {
                ++count;
                if (count % 2 == 0) {
                    String operator = next.toUpperCase();
                    if (!operators.containsKey(operator)) {
                        throw new IncorrectQueryException();
                    }

                    sqlQuery += operators.get(operator);
                } else {
                    sqlQuery += GET_DOCUMENTS.replace("?", "\"" + next + "\"");
                }
                next = nextTerm(reader);
            }

            if (count % 2 == 0) {
                throw new IncorrectQueryException();
            }

            List<String> list = retrieveDocuments(sqlQuery);
            return list;
        }