private void evaluateGraphQuery(final TupleResultBuilder builder,String xslPath,WorkbenchRequest req,HttpServletResponse resp,CookieHandler cookies,final GraphQuery query,boolean writeCookie,boolean paged,int offset,int limit) throws QueryEvaluationException, QueryResultHandlerException {
  List<Statement> statements=Iterations.asList(query.evaluate());
  if (writeCookie) {
    cookies.addTotalResultCountCookie(req,resp,statements.size());
  }
  builder.transform(xslPath,"graph.xsl");
  builder.start();
  builder.variables("subject","predicate","object");
  builder.link(Arrays.asList(INFO));
  if (paged && writeCookie) {
    int fromIndex=Math.min(0,offset);
    statements=statements.subList(fromIndex,Math.max(fromIndex,Math.min(offset + limit,statements.size())));
  }
  for (  Statement statement : statements) {
    builder.result(statement.getSubject(),statement.getPredicate(),statement.getObject(),statement.getContext());
  }
  builder.end();
}

private void evaluateGraphQuery ( final TupleResultBuilder builder , String xslPath , WorkbenchRequest req , HttpServletResponse resp , CookieHandler cookies , final GraphQuery query , boolean writeCookie , boolean paged , int offset , int limit ) throws QueryEvaluationException , QueryResultHandlerException { List < Statement > statements = Iterations . asList ( query . evaluate ( ) ) ; if ( writeCookie ) { cookies . addTotalResultCountCookie ( req , resp , statements . size ( ) ) ; } builder . transform ( xslPath , "graph.xsl" ) ; builder . start ( ) ; builder . variables ( "subject" , "predicate" , "object" ) ; builder . link ( Arrays . asList ( INFO ) ) ; if ( paged && writeCookie ) { int fromIndex = Math . min ( 0 , offset ) ; statements = statements . subList ( fromIndex , Math . max ( fromIndex , Math . min ( offset + limit , statements . size ( ) ) ) ) ; } for ( Statement statement : statements ) { builder . result ( statement . getSubject ( ) , statement . getPredicate ( ) , statement . getObject ( ) , statement . getContext ( ) ) ; } builder . end ( ) ; }
evaluate a graph query , and create an xml results document .
