public static void ploomQueryHandler(edu.isi.webtools.http.HttpExchange xchg) {
    { org.powerloom.PrintableStringWriter stream = edu.isi.webtools.http.HttpExchange.getReplyStream(xchg);
      Keyword method = edu.isi.webtools.http.HttpExchange.getRequestMethod(xchg);

      if (method == OntosaurusUtil.KWD_GET) {
        OntosaurusUtil.htmlWriteQueryFormPage(stream);
      }
      else if (method == OntosaurusUtil.KWD_POST) {
        try {
          { String body = edu.isi.webtools.http.HttpExchange.getRequestBody(xchg);
            KeyValueList values = edu.isi.webtools.http.Http.parseAndDecodeFormValues(body);

            OntosaurusUtil.htmlExecuteQuery(values, stream);
          }
        } catch (LogicException e) {
          edu.isi.webtools.http.HttpExchange.generateErrorResponse(xchg, OntosaurusUtil.KWD_BAD_REQUEST, Stella.exceptionMessage(e));
        } catch (java.lang.Exception e) {
          edu.isi.webtools.http.HttpExchange.generateErrorResponse(xchg, OntosaurusUtil.KWD_INTERNAL_ERROR, Stella.exceptionMessage(e));
        }
      }
      else {
        { String message000 = null;

          { Object old$PrintreadablyP$000 = Stella.$PRINTREADABLYp$.get();

            try {
              Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
              message000 = "Unhandled request method: " + "`" + Native.stringify(method) + "'";

            } finally {
              Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
            }
          }
          edu.isi.webtools.http.HttpExchange.generateErrorResponse(xchg, OntosaurusUtil.KWD_BAD_REQUEST, message000);
        }
      }
    }
  }