/** * Parses the query and splits it into three query stacks for correct processing order. * * @param query used to parse. */ private void loadSubqueryPriorityQ(Query query) { if (!query.isValid()) return; // TODO: throw an exception. for (String subquery : query.getQuery().split(" ")) { if (subquery.matches("(?i:r:.*)") || subquery.matches("(?i:p:.*)")) { highpriorities.push(subquery); } else if (subquery.matches("(?i:pprice.*)") || subquery.matches("(?i:rdate.*)")) { lowpriorities.push(subquery); } else if (subquery.matches("(?i:rscore.*)")) { rscorepriorities.push(subquery); } else highpriorities.push(subquery); } }