}
if (expression != null && query == NO_QUERY) {
if (expression instanceof Projection) {
query = new SelectQueryImpl(expression, graphRelationFactory);
} else if (expression instanceof Ask) {
query = new AskQueryImpl(expression, graphRelationFactory);
}
}
return query;
}