public static void output(Update update, IndentedWriter out, SerializationContext sCxt) {
   if (sCxt == null) sCxt = new SerializationContext();
   prologue(out, sCxt.getPrologue());
   outputUpdate(update, out, sCxt);
   // Update operations do not end in newline.
   out.flush();
 }
    private void outputQuad(Quad quad) {
      String qs = FmtUtils.stringForQuad(quad, sCxt.getPrefixMapping());

      if (quad.getGraph() != null) {
        String g = FmtUtils.stringForNode(quad.getGraph(), sCxt);
        out.print(g);
        out.print(" ");
      }
      outputTripleOfQuad(quad);
      out.println(" .");
    }
  public static void output(UpdateRequest request, IndentedWriter out, SerializationContext sCxt) {
    if (sCxt == null) sCxt = new SerializationContext(request);
    prologue(out, sCxt.getPrologue());
    boolean addSeparator = (request.getOperations().size() > 1);
    boolean first = true;

    for (Update update : request.getOperations()) {
      out.ensureStartOfLine();
      if (!first) out.println();
      first = false;
      outputUpdate(update, out, sCxt);
      if (addSeparator) out.print(" ;");
    }

    // Update requests always end in newline.
    out.ensureStartOfLine();
    out.flush();
  }