public static void verify(TupleFlowParameters parameters, ErrorHandler handler) {
    if (!parameters.getXML().containsKey("filename")) {
      handler.addError("DocumentIndexWriter requires an 'filename' parameter.");
      return;
    }

    String index = parameters.getXML().get("filename");
    Verification.requireWriteableFile(index, handler);
  }
 public DocumentIndexWriter(TupleFlowParameters parameters)
     throws FileNotFoundException, IOException {
   Parameters p = new Parameters();
   p.add("isCompressed", "true");
   writer = new IndexWriter(parameters.getXML().get("filename"), p);
   documentsWritten = parameters.getCounter("Documents Written");
 }