\begin{figure*}[tpb]
\begin{center}\small
\begin{boxedverbatim}
public void execute() throws ExecutionException {
   if (corpus.indexOf(document) == 0) {
      // Before analysing the first document: initialize the data for the corpus
   }

   // Analyse this document and record the votes

   if (corpus.indexOf(document) == (corpus.size() - 1)) {
      // After analysing the last document: compute the results,
      // generate RDF-XML, and store it as a corpus feature 
   }
}
\end{boxedverbatim}
\end{center}
\caption[Hooks in a voting PR's \emph{execute()} method]{Hooks in a voting PR's \emph{execute()}
  method.  Note that \emph{CorpusController.execute()} iterates through the corpus's documents in
  list order: opening each document, calling each PR's \emph{execute()} method, and closing the
  document.}
\label{fig:hooks}
\end{figure*}
