return catalogReceipts;
}
protected QueryExpression reduceToUnderstoodExpressions(Catalog catalog, QueryExpression queryExpression) throws CatalogDictionaryException, CatalogException {
if (queryExpression instanceof QueryLogicalGroup) {
QueryLogicalGroup queryLogicalGroup = (QueryLogicalGroup) queryExpression;
List<QueryExpression> restrictedExpressions = new Vector<QueryExpression>();
for (QueryExpression qe : queryLogicalGroup.getExpressions()) {
QueryExpression restrictedQE = this.reduceToUnderstoodExpressions(catalog, qe);
if (restrictedQE == null && queryLogicalGroup.getOperator().equals(QueryLogicalGroup.Operator.AND) && this.disableIntersectingCrossCatalogQueries) {
restrictedExpressions.clear();
break;
}
if (restrictedQE != null)
restrictedExpressions.add(restrictedQE);
}
if (restrictedExpressions.size() > 0) {
if (restrictedExpressions.size() == 1) {
return restrictedExpressions.get(0);
}else {
QueryLogicalGroup restrictedQueryLogicalGroup = queryLogicalGroup.clone();
restrictedQueryLogicalGroup.setExpressions(restrictedExpressions);
return restrictedQueryLogicalGroup;
}
}else {
return null;
}