input = new Graph[]{graphModel.getGraph(newView)}; //duplicate root
}
//PROCESS
if (q instanceof OperatorQueryImpl && !((OperatorQueryImpl) q).isSimple()) {
OperatorQueryImpl operatorQuery = (OperatorQueryImpl) q;
Operator op = (Operator) operatorQuery.getFilter();
q.setResult(op.filter(input));
} else if (q instanceof OperatorQueryImpl && ((OperatorQueryImpl) q).isSimple()) {
OperatorQueryImpl operatorQuery = (OperatorQueryImpl) q;
Operator op = (Operator) operatorQuery.getFilter();
Filter[] filters = new Filter[operatorQuery.getChildrenCount()];
for (int k = 0; k < filters.length; k++) {
filters[k] = operatorQuery.getChildAt(k).getFilter();
}
GraphView newView = graphModel.newView();
views.add(newView);
q.setResult(op.filter(graphModel.getGraph(newView), filters));
} else {
FilterQueryImpl filterQuery = (FilterQueryImpl) q;
Filter filter = filterQuery.getFilter();
if (filter instanceof NodeFilter && filter instanceof EdgeFilter) {
processNodeFilter((NodeFilter) filter, input[0]);