@@ -0,0 +1,1205 @@
+package org.wyona.neutron;%0A%0A/**%0A * Utility class in order to generate XML based on specification: http://neutron.wyona.org/draft-neutron-protocol-v0.html%0A */%0Apublic class XMLExceptionV1 %7B%0A%0A    // http://neutron.wyona.org/draft-neutron-protocol-v0.html#rfc.section.8%0A    public static int AUTHORIZATION = 0;%0A    public static int AUTHENTICATION = 1;%0A    public static int CHECKOUT = 2;%0A    public static int CHECKIN = 3;%0A    public static int DATA_NOT_WELL_FORMED = 4;%0A%0A    /**%0A     *%0A     */%0A    public String getDefaultException(int type, String message) %7B%0A        StringBuilder sb = new StringBuilder();%0A        sb.append(%22%3C?xml version=%5C%221.0%5C%22?%3E%22);%0A        sb.append(%22%3Cexception xmlns=%5C%22http://www.wyona.org/neutron/1.0%5C%22 type=%5C%22%22 + getTypeAsString(type) + %22%5C%22%3E%22);%0A        sb.append(%22%3Cmessage%3E%22 + message + %22%3C/message%3E%22);%0A        sb.append(%22%3C/exception%3E%22);%0A        return sb.toString();%0A    %7D%0A%0A    /**%0A     *%0A     */%0A    public static String getTypeAsString(int type) %7B%0A        if (type == AUTHORIZATION) %7B%0A            return %22authorization%22;%0A        %7D else if (type == DATA_NOT_WELL_FORMED) %7B%0A            return %22data-not-well-formed%22;%0A        %7D else %7B%0A            return %22unknown%22;%0A        %7D%0A    %7D%0A%7D%0A

refactor Neutron classes into separate library